32 points · by hckr · 12y ago · 43 comments
print('hello world')
Dart, which was released two years ago, after JavaScript had been around for two decades and ASI was still considered an issue, still required a semicolon after each statement.I half feel like pulling out an AST and doing a ModernDart, getting rid of all the redundant tokens and compiling to the } } } } } language we all know and ignore.
Redundancy leads to inconsistencies and is thus poor design. DRY applies to syntax too.
module Main
main = println "Hello World"
as inferior to a language where it is println "Hello World"
simply because of that. That's a particularly superficial way of looking at languages.edit: my pull request with a fix was accepted
It would be cool to see something like this but tiered by some kind of language evolution (group all the Lisps, all the Javascript-functionality languages, the C's, etc).
var hello = function() {document.write("Hello World")}; hello();
while the javascript is the equivalent of document.write "Hello World" hello = ->
alert "Hello, world!"
hello()
Why complicate things? console.log 'hello world'> This collection includes 441 Hello World programs in many more-or-less well known programming languages, plus 64 human languages.
This is top five:
20 helloworld/delphi.pas
25 helloworld/omgrofl.omgrofl
30 helloworld/whitespace
59 helloworld/shakespeare.shakespeare
65 helloworld/chef.chefhttps://github.com/Prithvirajbilla/helloworld/blob/master/ch...
The best (esoteric) programming language.
30 helloworld/whitespace
59 helloworld/shakespeare.shakespeare
65 helloworld/chef.chef
25 helloworld/omgrofl.omgrofl
20 helloworld/delphi.pas
22 helloworld/x86.asm
Copy pasted some of the biggest ones.This repo should become a testcase
[1] https://github.com/Prithvirajbilla/helloworld/search?l=pasca...
[2] https://github.com/Prithvirajbilla/helloworld/search?l=actio...
[3] https://github.com/Prithvirajbilla/helloworld/search?l=omgro...
[4] https://github.com/Prithvirajbilla/helloworld/search?l=xtend