Hacker News new | ask | show | jobs
by treenyc 3900 days ago
"The idea that you can have a language which is portable/reimplementable on any platform is fundamentally flawed. You can't."

Can you elaborate? Shouldn't VM just standardize EVERYTHING on the language level? Can you give specific examples when language NEED to be aware of the hardware?

3 comments

Not the parent;

You always need to be aware of the hardware/target-platform. Some examples:

1. Bioinformatics 2. Data storage 3. Any soft real-time application 4. Any kind of constraint search with simulated annealing through large spaces 5. Operating systems 6. Compilers 7. Image recognition/analysis 8. Rendering 9. Basically any application where the user expects a responsive result

You ignore performance at your peril. The reason why we have super-fast computers and software with loading screens is because of this thinking.

If you do have a legitimate reason to run on a VM you should be aware of the burden its abstractions places on your ability to reason about the performance and costs your program will incur.

Sure, you can standardize everything. Just get the most common denominator of all your supported platforms and abstract that away. Problem is, it won't be useful for anything practical.

Someone mentioned C, and it's a good example. C is different on every platform. If your C code interacts with the world in any way, you won't write the same code. Libraries will be totally different, not to mention that pointer sizes are different, byte ordering is different, and even your lowly int might betray you. The reason why C is so practical and widely used is exactly because it doesn't try to force a platform abstraction on you.

This isn't talking about hardware, it is talking about host language.

In the case of a host language, any integration beyond the most simple with the host is going to require implementation specific code.