I want to make a compiler for my own programming language. Popular backend choices seem to be C, Java, LLVM, JVM bytecode, .Net bytecode, gcc, assembly... Here, I am considering the possibility of Go as a backend.
Go is apparently a fast language, with garbage collection, and fast compile times. It is also portable and free (BSD-style licence). All those would make Go a good choice as a target of code generation, I think, maybe even better than the other options... So I am surprised I can't find anybody doing that already.
Would Go be a good choice for code generation? Can you point at existing projects doing so, or explain why there are none? Or even better, do you have experience with using the Go language as a backend? Are there any downside I am unaware of?
(I'm specifically interested in Go here. Don't just point at alternative backend options, there are questions answering that already.)
Go makes an ideal choice for backend web development, particularly for high-performing concurrent services on the server side. It can be used for building the server side of your mobile app too. For instance, the GUI part of an Android app can be written in Java while the app backend can use Golang.
Known as the back-end of the compiler, the synthesis phase generates the target program with the help of intermediate source code representation and symbol table. A compiler can have many phases and passes. Pass : A pass refers to the traversal of a compiler through the entire program.
Go, also called Golang, is an open source, statically typed, compiled, cross-platform, and lightning fast programming language first introduced by Google in 2009. Go is multi-purpose, it is a good language for backend development.
Go brings the best of both worlds. Like lower-level languages like C/C++, Go has compiled language. That means performance is almost nearer to lower-level languages. It also uses garbage collection to allocation and removal of the object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With