5 ms·
More info please? That sounds pretty hard / impossible to do.
by gonzus 7y ago
More info please? That sounds pretty hard / impossible to do.
- gonzus 7y agoI stand corrected; this was in fact discussed before, right here on HN: https://news.ycombinator.com/item?id=17087469 https://news.ycombinator.com/item?id=17087469 -- very nice read.
- chrisseaton 7y ago> That sounds pretty hard / impossible to do. Why do you think that? This is how most compilers used to work. And languages like Pascal were specifically designed to be able to be compiled in a mostly single pass. Look up ‘syntax directed translation’ in an old compiler textbook.
- tmzt 7y agoDoes that include Go? The speed of the compiler and some of the syntax suggest that it should be possible.
- chrisseaton 7y agoSorry not really an expert in Go.
- pansa2 7y agoGo creates an AST and uses an SSA intermediate representation [0]. [0] https://eli.thegreenplace.net/2019/go-compiler-internals-adding-a-new-statement-to-go-part-2/ https://eli.thegreenplace.net/2019/go-compiler-internals-add...