Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes. Pony compiles to LLVM bytecode and from there to native binaries.


So it has Rust and C++'s compile time problems?


It shares LLVM pros and cons of other languages that compile to LLVM bytecode.


What would you suggest someone use instead? As someone looking to write his own language, I'm very interested in alternatives to LLVM.


Using a system like LLVM locks you into C-like behavior. You can work around it, but it's harder and can come with unnecessary overheads.

Nanopass is one approach to compiling that tends to be more general.

However, LLVM is great if you just want to compile without learning the intracies of assembly. It even gives you access to multiple backends.

Linking against a framework let's you get up to speed faster, and someone else handles the security in your compiler, for the most part.

But, when you need flexibility, you'll probably need to do it yourself.

(See Scala and Dotty, as Scala becomes even less Java-like).


With zapcc these times are gone, but yes.

It doesn't have the rust problems with manual locking and deadlocks, and the C++ syntax horrors. It's also smaller and faster than those.


can you elaborate on what you mean, as it relates to Pony?


LLVM was originally designed for C like languages, until recently used the system linker (lld is a recent change), so any language that uses it for its backend tends to suffer from the same lengthy compilations as C and C++.

Unless they create their own intermediate language, so that they can do as much work as possible, before passing the bucket to LLVM.

Hence why Swift has SIL, Rust MIR, and so forth for other languages.


I don't think the use of the system linker is why Swift has SIL, nor Rust has MIR. It's true that one of the possible benefits of Rust's MIR is faster compilations, but it is fundamentally motivated by representing (and checking) semantic information that is unavailable at the LLVM level. Whatever linker LLVM happens to use is orthogonal to this.




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

Search: