Hacker News new | past | comments | ask | show | jobs | submit login

Is it only me that finds it strange that engineers working in a particular language will get another language to solve issues with said language? e.g. Javascript using C, C++, Zig, Rust, etc. Ruby and Python is also similar situation there are tools, libraries and such built in other languages



This is the way any interpreted language works, the interpreter has to be written in something and for good performance this has to be a compiled language


Usually. Pypy is a counterexample, with a JIT compiler written in Python: https://www.pypy.org/


It’s written in a very restricted variant of Python, rpython: https://rpython.readthedocs.io/en/latest/rpython.html


"RPython is a subset of Python2 that can be statically compiled. The PyPy interpreter is written mostly in RPython (with pieces in Python), while the RPython compiler is written in Python." - https://rpython.readthedocs.io/en/latest/getting-started.htm...


I don't think it's strange. A programming language should focus on a specific problem domain, and not try to solve problems outside that domain (not that Javascript is a particular good example of that philosophy though).


One could flip that question around: given there's all these fast C/C++/Fortran libraries, why do we have all these scripting languages?

The answer usually is there's a bunch of IO/parsing/configuration that we need to do, and doing that in a lower-level language isn't that much faster overall, is much less maintainable or accessible for users than wrapping in a scripting language, or simply avoids the need for recompiling each time you want to modify something (e.g. game engines with a high-level scripting component).


Bun is not solving the language though. It uses JavaScriptCore, which is written in C/C++


It’s the same reason people will use Vue or React instead of writing their own frameworks for each and every website. Or why people target Windows or macOS instead of writing their applications to run on bare metal.

Abstractions are needed to simplify the problems of a particular stack.

If that weren’t the case then we would all still be punching machine code directly into computers.


I find it strange to find that strange. Why wouldn't one leverage one language's strengths to address a shortcoming in another?




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

Search: