7 ms·
I would suggest the next big JVM Language should be a blend of JavaScript and Java where one would provide optimization hints to a javascript program using elem
by jhrobert 16y ago
I would suggest the next big JVM Language should be a blend of JavaScript and Java where one would provide optimization hints to a javascript program using element of java syntax.
Strong typing should be viewed as an optimization, either to optimize code's correctness or to optimize code's speed.
If you add CoffeeScript on top of that... whoa!
- m0th87 16y agoIt's also about better IDE facilities. I mostly use Python now, but boy do I miss solid autocompletion and refactoring.
- barrkel 16y agoUnfortunately, providing solid autocompletion for dynamic languages implies solving the halting problem.
- mahmud 16y agoHow so? you just need reflection. Slime does it for Common Lisp and it doesn't break a sweat, that is, without using any advanced MOP stuff.
- barrkel 16y agoReflection implies that you're running the code at code editing time, otherwise there's nothing to reflect over. That, in turn, opens up a huge can of worms for a large class of applications which aren't easily editable in what effectively is a debug session. Just to be clear, this is what I mean when I talk about autocompletion (cursor is |): def foo(bar): bar.| In order to complete on bar, you need to know the symbols available on the potential runtime values of bar. Everything can be in a system image, and you still don't know what gets through to foo() unless you either symbolically or actually evaluate the code and have a semantic breakpoint at the start of foo().
- mahmud 16y agoReflection doesn't mean "you're running the code at editing time". I hope we're not confusing Java reflection with Eclipse's aggressive compilation of things as you type. As per your specific example, I think the reason SLIME works is because Common Lisp uses generic functions, instead of class methods. The calls are not Object.Method() rather Method(Object:Class) so Metho| always resolves. However, I will grant you this: automatic class loading will easily trip up SLIME and similar tools. Hmmm, I am gonna need to think about this further.
- barrkel 16y agoI have no idea what Eclipse does as you type; I don't normally use Eclipse. I am, however, employed to maintain a static language compiler which is used by its IDE for code completion (Delphi in RAD Studio). I also implemented the runtime reflection object model (Rtti unit) used in the latest versions of Delphi. By reflection, I'm talking about interrogating runtime objects to see what's available on them. They need to be runtime objects because of monkeypatching and similar techniques. Because they're runtime objects, in some sense the code needs to be run in order to interrogate the objects. That execution may be symbolic, but that symbolic evaluation hits the halting problem, because it's normally a Turing-equivalent machine which determines how the objects will get constructed.
- pjscott 16y agoSLIME autocompletion for Lisp works beautifully, and that language is about as dynamic as they come. What's the problem here?
- barrkel 16y agoI've addressed that in the other comments.
- pjscott 16y agoOops; your reply happened between the time I loaded the page and the time I hit the reply button. I think it would be cool if Reddit-style comment systems could show new comments in realtime, Wave-style. The number one complaint about wave is that "it's cool, but I don't know what I would use it for". People already know what to use sites like HN for. I'm not sure how usable it would be to have comments suddenly appearing -- it might get overwhelming if there are over 1000 comments, as on some Reddit articles -- but I think it could be pleasant on a smaller site like HN.