3 ms·
No, in this case it pretty much does boil down to Rust or C++. This is a low-level tool, not a webapp.
by blub 11y ago
No, in this case it pretty much does boil down to Rust or C++. This is a low-level tool, not a webapp.
- falcolas 11y agoThat still gives you Lisp, Ada, Go, Haskell, and Java, if you make the (imo incorrect) assumption that "low level" tools can only be written in languages which compile down to bytecode. Of course, Mercurial gives lie to this assumption.
- samirm 11y agoJava? You won't get any performance out of it compared to something like C.
- pjmlp 11y agoIn what scale? What it matters is if it is fast enough for the use case being targeted. As side note I remember when C compilers for home computers generated worser code than junior Assembly programmers.
- joushou 11y agoI don't like Java, but don't underestimate the performance of the JVM. Unless you're a crazy perf wiz, then your average C code won't beat your average Java code. It's fast enough for short processes, and for long processes the JIT is pretty darn good. Also note that a JIT can perform runtime assumptions and optimize code based on what is currently the case, which an AOT compiler cannot. It takes a lot more than a toolchain to write fast code.
- ptc 11y ago@falcolas -- I think you mean machine code not bytecode. And w.r.t. Mercurial afaik the project's hot paths are all written in Cython extensions, and there's ongoing work to improve the Python part by working with the PyPy folks. So, there's definite technical advantages in using Python for greater developer productivity, but there's also a cost.
- pjmlp 11y agoA command line tool like Git can be written in any programming language that has implementations capable of generating native code. Even then, Mercurial is implemented in Python and quite usable
- bsder 11y agoGit is not a "low-level" tool. The fact that a Java rewrite of git actually exists demonstrates the falsity of this statement.