Comment by ricardobeat

18 hours ago

I see JavaScript.

Some of these really look like QoL improvements. I'm not convinced ternary statements are an ergonomic improvement in particular. The examples given don't make a compelling case, 'visually tidy' is not the same as readable.

Worse, I see C (as in ! or &&), and Perl (as in manifestly more than one way to do it).

There are real improvements though, such as ?. and ??= that help with default-nullable everything.

Ternary is very useful, but it I'd rather see it implemented idiomatically:

  pos += (if forward then +1 else -1)

Structural pattern-matching could be fantastic, but no syntax is suggested.

I kinda have seen somewhere on internet, that the language design of lua and js(well, ecmascript to be precise) is somehow related. But can't really find the exact reference I have seen.. it was long time ago when I read this.

  • There's some overlap in the languages they were inspired by (eg Scheme, or the chains Modula -> Lua vs Modula -> Java -> Javascript), but as far as I'm aware, the original designs were made independently.

    Now, the object systems do look similar, but that seems to be a case of convergent evolution: Javascript took direct inspiration from Self, whereas Lua's system is based on a more generic fallback mechanism for table access.