However, there’s no a priori reason why C has to compile to x86 assembly. If you compile C with GCC or if you compile OCaml, then chances are your compiler is using one of these targets. Traditionally, a compiler would target platform-specific machine code/assembly (e.g. An important question when building a new programming language is what language you will compile to, or what target you choose. These two components are called the “source” and “target,” the kind of thing you compile from and to. We usually call a program a compiler when it takes code of one form and translates it into code of a significantly different form, often times a different language (and we usually call more minor transformations “macros”). See Part 1: “A Coming Revolution in Metaprogramming”. Note: this post is part of an ongoing series on extensible compilation. With more work on languages, tooling, and Rust compiler development, we can create an ecosystem of beautifully interoperable programming languages. Targeting Rust can give new languages free package management, a type system, and memory safety while not imposing too many opinions on the language's runtime. New programming languages with a system-level compile target should choose Rust over LLVM.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |