DEV Community

Discussion on: How Lua Avoids Semicolons

Collapse
 
eljayadobe profile image
Eljay-Adobe

F# does not have semicolons. I think it's different than the aforementioned categories, so you might want to check it out.

I like Lua. It's very tiny (about 100 KB footprint for the engine), and easy on the eyes. And is capable of doing large projects, like desktop applications.

For JavaScript, I like Standard as a formatter. Omits the superfluous semicolons.

I also like Python. No semicolons. (But it does have semantically meaningful indentation, which is my only twitch to the language.)

Line oriented programming languages, like Fortran or Basic, don't have semicolons. But they are line oriented. Which means you'd probably need some sort of "line continuation" marker.

I program in C++, which is a semicolon language. I also like D, which is another semicolon language.

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!