4 ms·
I think the use of , and or newline to separate statements is a stroke of genius instead of just treating them as optional whitespace. Totally feels like a more
by shaunxcode 17y ago
I think the use of , and or newline to separate statements is a stroke of genius instead of just treating them as optional whitespace. Totally feels like a more concise smalltalk if that makes sense.
- stcredzero 17y agoThe colon-period pairing to indicate a block is just as clever. That way, the colon actually serves a purpose instead of just being syntactic noise as it is in Python. The ability to use tables as arguments also gives you the advantages of keyword arguments in Smalltalk, but does it folded in with a generic mechanism. As a result, the language is bigger than Smalltalk, but it feels just as small.
- msluyter 17y agoMy eyesight isn't great and perhaps it just takes getting used to, but I found periods rather hard to scan visually. Ay first glance I'd prefer something else.
- silentbicycle 17y agoA syntax-aware editor's highlighting or automatic indentation could provide an extra clue, though. It can scan for periods quite easily. Prolog and Erlang (which was initially implemented in Prolog) use periods to end blocks, as well. While it can make rearranging expressions in a block a little annoying ("," vs "." in Prolog, "," and ";" vs "." in Erlang), it's small potatoes compared to the syntactic quirks in, say, C. Also, Lua does the same "table as an argument -> keyword arguments" trick. (He mentions Lua in the list of influences.)
- stcredzero 17y agoSo in reading English, you really don't use the periods. What about period-space-space? Using capitalization for delimiting code -- I'm not sure why I have a negative feeling about that.