Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Squeak Smalltalk is better in it - you can actually type in arguments of method and a result and it can find you method that, given these arguments, returns this result.

So, for example you can type: 'hello'. 'HELLO' and it finds you 'asUppercase' method of String object.



How does it perform this search? I can't imagine running all functions with a matching type signature scaling to more complex examples.


Well, in fact it does something like this. But what messages it tries is actually limited. It has been a while since I looked at it and so don't remember the details.

This is a very useful function of Squeak and I presume Pharo Smalltalk but I think users of it should have some awareness that it has limitations and not to simply assume that because a result is not found that it does not exist.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: