3 ms·
I see JavaScript. Some of these really look like QoL improvements. I'm not convinced ternary statements are an ergonomic improvement in particular. The example
by ricardobeat 4mo 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.
- nine_k 4mo agoWorse, 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.
- deleted 4mo ago[deleted]
- fluoridation 4mo agoLua to me always felt very JavaScripty, just with a different syntax.
- drdexebtjl 4mo agoLua predates JavaScript by about 2 years though.
- jsomedon 4mo agoI 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.
- cygx 4mo agoThere'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.