3 ms·
I really like this feature (which actually comes from Smalltalk's doesNotUnderstand:). It is actually supported on firefox[1][2][3] as __noSuchMethod__, but it
by DanielRibeiro 15y ago
I really like this feature (which actually comes from Smalltalk's doesNotUnderstand:). It is actually supported on firefox[1][2][3] as __noSuchMethod__, but it is non standard, and should not be relied when writing cross platform js.
But then I guess the thread starts getting a bit off track, and I apologize. The point is:
Supporting other languages is good for the framework, and for the community
GWT took the position: Java source only. Cappuccino can take the same position: Objective-j only. It is fine. It is also limiting.
I am always happier when great frameworks support multiple languages, when it opens the doors for more people, instead of shutting down to a smaller community. It helps create greater value to more people, which I'm always for. It does have its costs. In the end, it is a trade-off which the creators and the community have to make.
PS: An example of a framework that does this (written ina more powerful language, supporting a less powerful one) is Akka[4]. It is written in Scala, but its Java interface, while more cumbersome, is so good that I could create a JRuby interface[5] that is even more expressive (thanks to method_missing) than the original one in Scala.
[1] https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/noSuchMethod https://developer.mozilla.org/en/JavaScript/Reference/Global...
[2] http://stackoverflow.com/questions/3811408/node-js-overloading-functions http://stackoverflow.com/questions/3811408/node-js-overloadi...
[3] http://yehudakatz.com/2008/08/18/method_missing-in-javascript/ http://yehudakatz.com/2008/08/18/method_missing-in-javascrip...
[4] http://akka.io/ http://akka.io/
[5] http://metaphysicaldeveloper.wordpress.com/2010/12/16/high-level-concurrency-with-jruby-and-akka-actors/ http://metaphysicaldeveloper.wordpress.com/2010/12/16/high-l...
- tlrobinson 15y agoI actually agree with you (It's not a coincidence I wrote the CappRuby project mentioned in the boucher's comment). At some point I'd like to build some nicer pure-JavaScript bindings to the Objective-J runtime which get you 90% of what you get from Objective-J without the OMG-WTF-is-this-new-language reactions. However, I'm not convinced it will make a big difference. Language style and convention permeate libraries/frameworks, and simple language bindings often results in a sort of "uncanny valley". Can you name any significant frameworks that are more commonly used from an alternative language than the one it was originally written for?
- DanielRibeiro 15y agoI also agree that making "lower level" bindings can leave the API a bit shady (Akka's[1] Java version is a bit uglier due to lack of Anonymous Functions, which have to be replaced by Interfaces). About example of frameworks which more popular in another language, I honestly can't think of few other than Akka. I admit is uncommon for frameworks to support its host language (in a multi-language platform), and host languages are usually much more crowded than their sub-language counterparts. What happens far more frequently is a complete re-implementation on the host language, example: instead of using JRuby on Rails, people migrate to Play framework[2] Hadoop[3], however, seems to be getting really tracktion from its other language bindings[4], as writing map-reduce tasks in Java is not fun at all. [1] http://akka.io/ http://akka.io/ [2] http://www.playframework.org/ http://www.playframework.org/ [3] http://hadoop.apache.org/ http://hadoop.apache.org/ [4] http://pig.apache.org/ http://pig.apache.org/