Hacker News new | ask | show | jobs
by hot_gril 905 days ago
My problem is that when designing my own language, I decided on GC, lambda syntax, async/await, weak typing, and... oops, it's basically just Javascript. Sure it'd have tons of smaller differences vs JS, but it's too demotivating.
3 comments

It is still a great learning exercise IMO. Knowing which features are good/familiar to use, but difficult to implement, lets you explore other avenues, like news_to_me and the backslash for lambda [1].

For me, for example, I was gonna go with async/await in my toy language, but didn't like the implementation and decided to explore a monad-like direction.

[1] https://news.ycombinator.com/item?id=38851863

I can see this learning exercise applying to other things, only it takes a lot of time and commitment. So far I've also learned a lot on other projects that I was able to carry out more fully. But everyone has their thing.
Javascript (for all its warts) does in many ways seem to be converging on a certainly local maximum for ergonomic language design. Perhaps this is because it is used so much in the 'wild west' of browser programming? Where things can move quickly, with polyfill for backwards compatibility (a modern marvel to my eyes, being able to use new language features on old platforms!)
Yes, it's an example of not letting perfection get in the way of good. They made something accessible, and the finer details got worked out later.
The other thing is, JS was designed with the web use case in mind. If I ever make a language, it'll be for some new use case that really needs one, perhaps some extension of SQL. And it'll prioritize ease of use in that case over "purity" or other principles.
Js lacks progressive typing, that could be an interesting feat
TS tried, and I didn't like the end result.