DEV Community

Discussion on: How Lua Avoids Semicolons

Collapse
 
17cupsofcoffee profile image
Joe Clay

I love F#, wish I got chance to use it more often :) Definitely my favorite functional programming language. Looking very briefly at the language spec, it seems like they do some sort of filtering on the the token stream to determine whether an operator is prefix or not? I was under the impression they just used the whitespace to figure that out, so that's super interesting - will have to investigate further :)

Yeah, the fact that Lua works well in a lot of different scenarios is one of the main things I like about it!

I think a good formatter is a must if you're going to use automatic semicolon insertion. This is probably why it's worked out quite well for Go - they bundle one with the language.

Python is a really cool language, and I love their attitude towards language design (Zen of Python, etc). That said, shakes fist in general direction of significant whitespace

D is a language I've heard a lot about, but never tried - need to check that out at some point!