by Janzert · 17y ago · 0 comments
It allows for less syntax, which is a win for readability and also less boilerplate tokens, but still gives you a little freedom to mess with your indentation, unlike python. It means that (true) lambdas wouldn't be a syntactical enigma like they would be in python.
I don't think that you would need to use "}" to end a block though, since it looks like its missing the opening bracket, but maybe double semicolons would work, since they apparently aren't used elsewhere:
MAIN()
IO.write("Hello, World!\n")
;;
To be honest, the syntax that I have found to be nicest on the eyes so far has been Io: whois := method(host,
socket := Socket clone setHostName("rs.internic.net") setPort(43)
socket connect streamWrite(host, "\n")
while(socket streamReadNextChunk, nil)
return socket readBuffer
)
taken from http://www.iolanguage.com/scm/git/checkout/Io/docs/IoGuide.h...What do you mean?
I like both approaches. it's better then having useless {. In some cases improve readability over python lack of marks. and risking mod down by the audience we have here, it's (much (better then (the gratuitous use of (parenthesis in lisp)))))
how (
is {
this();
}
any();
better(
than[$parenthesis]
);
);
? how (
is {
this();
}
any();
better(
than[$parenthesis]
);
);