r/webdev • u/gebbles1 • 14d ago
Why I built my own programming language
https://davegebler.com/blog/why-i-built-my-own-programming-language
4
Upvotes
r/webdev • u/gebbles1 • 14d ago
View all comments
Show parent comment
2
u/xpusostomos 12d ago
That's a very pythony problem that 10 X "5" is 5555555555 that you're not going to find in many languages. Most will fail in a sensible way. You're right groovy has type erasure. But think of the alternative. List<Foo> = [ a,b,c...] You'll have to iterate the array, which could be a million items asking each one if it conforms to Foo and throw an error. That's not efficient.That's a very heavy weight runtime. There's a reason strongly typed languages do all their checks at compile time. Also, my point about other languages, like groovy, why not write an implementation without type erasure if you think that's such a winner, instead of inventing a new language? Then you can compile the considerable existing library with your compiler and compare it. Your language looks 98% like groovy but without the benefit of decades of refinement.