Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Why haven't we seen more languages compile like Java/C#?
1 point by 0dayz on Aug 21, 2023 | hide | past | favorite | 3 comments
I've always been interested in these language's compilation process, since it seem to strike a balance between low-level native code like C and high-level code like Python with much easier cross-platform support & better performance than interpreted languages.

However, the fact is both of these languages are OOP is not necessarily a shame but I think it limits the potential of said tech, but also from personal experience I have some issues with, not with OO paradigm itself but more how C#/Java implemented "everything is an object", with mixed result:

* The good being that they added enhancements like abstract classes and interface (and probably more)

* The bad being that it becomes more about "taming" the object with:

- Access modifiers (public, private, protected, etc.).

- Interfaces, which I like, but defining interfaces for every class can become overwhelming.

- Even design patterns, also a good idea, however at least for me I will spend way too much time second guessing myself if the design pattern I choose was the correct one and other's input seems more opinionated rather than objective.

Hence I think that this over-engineering is what has caused a lot of programmers to be so cynical about OOP & about how Rust & Golang being such "breath of fresh air".

The question then is, despite of at least some benefits of C# (like how C# is slowly becoming a good alternative for gamedev or C# is the primary language for creating addons for FFXIV) - why do we not see:

1. More languages take at least some inspiration of the C#/Java approach to compiling the code?

2. Have languages that are almost a carbon copy of C#/Java's compilation without treating everything like an object - similar to C++.

Need to stress of course I understand that the history of the development of C# and Java was probably tens of millions of R&D.




I'm not an expert, but I think it's because modern interpreted and compiled languages leave little to be desired. With how good Python is these days, why would you really learn C# and Java? I'm being a little facetious, but part of it is also true. We have really good REPL languages that obviate the desire for VM-styled languages.

The idea of a language tuned more for a human than a machine is as attractive as ever, but I'm not convinced we need to use complex VMs to get there. These languages are cool and have powerful concepts underneath them, but most of their syntactic sugar has been cloned in other, simpler languages. I haven't written Java since grade school, though. Maybe things are different now.


Is it fair to say that your argument is that low-level and high-level languages are broad enough today thar there's no incentive to make a balanced language (essentially)?

I think in a way you're right but I think languages with vms should provide a much bigger scope for those wishing to create say software that instruct to an underlying language (like my gamedev and addons example).

Where as python is simple and powerful, it's "harder" to get low-level and is limited in performance to some degree.

Hence where programming language s with a vm could fill in that niche.


.NET/CLR has F# and the JVM has Clojure. Both are languages that tends towards FP, but compile to the same intermediate as their OO counterparts. In fact both VMs have a plethora of languages to chose from. You seem to be confusing VMs with their primary language. I would suggest researching JIT (Just in Time) more and its common implementations.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: