6 ms·
Curious what the deployment story for this looks like compared to things like Crystal. Is it compiled?
by kkirsche 10y ago
Curious what the deployment story for this looks like compared to things like Crystal. Is it compiled?
- spooneybarger 10y agoYes. Pony compiles to LLVM bytecode and from there to native binaries.
- fnord123 10y agoSo it has Rust and C++'s compile time problems?
- spooneybarger 10y agoIt shares LLVM pros and cons of other languages that compile to LLVM bytecode.
- appleflaxen 10y agocan you elaborate on what you mean, as it relates to Pony?
- pjmlp 10y agoLLVM 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.
- dbaupp 10y agoI 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.
- striking 10y agoWhat would you suggest someone use instead? As someone looking to write his own language, I'm very interested in alternatives to LLVM.
- shakna 10y agoUsing 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).
- rurban 10y agoWith 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.