Re:"Hello World" in Dart, compiled to JavaScript
by stephenr on Tuesday October 11, 2011 @03:40AM
(#3097602)
The "other tool" you mention reduces this to 2300 lines, and that's with the "remove unused code" option enabled.
Still fails.
Re:"Hello World" in Dart, compiled to JavaScript
by andypants on Tuesday October 11, 2011 @08:45AM
(#3098306)
Damn... all the hello world programs I've written in dart just feel like such a waste now :[
SOMEBODY PLEASE RECOMMEND A GOOD HELLO WORLD LANGUAGE!!
Re:"Hello World" in Dart, compiled to JavaScript
by RodgerTheGreat on Tuesday October 11, 2011 @10:49AM
(#3098775)
Already a solved problem thanks to HQ9+:
http://www.esolangs.org/wiki/HQ9
2. The reason for spitting out "inefficient" code is already described in my post. This is inefficient for Hello, World. That's fine, it may be the proper tradeoff for efficiency in more complex code. Take CocoaTouch for example. If you write a HelloWorld app for iOS and profile it, you could say "why on earth is this app reading in preferences, sending out didLaunch delegate messages, etc etc etc. Doesn't the code KNOW I don't need that and all I want is to show one string". This is an acceptable tradeoff, because all those things its doing are useful for more complex apps. No one is shipping HelloWorld, so who cares if its slower than the best possible HelloWorld? Is it possible to write a compiler so smart that it would even make HelloWorld super small and fast. Sure, maybe, but those engineering resources are much better spent working on problems real applications face. I'd much prefer Apple focus on scrolling performance than HelloWorld. And similarly, I much prefer Google focus on the problem of writing huge web apps that still perform really well, since thats the remaining unsolved problem for the web.