logoalt Hacker News

ricardobeattoday at 1:16 AM3 repliesview on HN

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.


Replies

nine_ktoday at 1:50 AM

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.
jsomedontoday at 9:05 AM

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.

show 1 reply
fluoridationtoday at 7:44 AM

Lua to me always felt very JavaScripty, just with a different syntax.

show 1 reply