3 ms·
It's too bad this is written in Haskell. I don't have anything against Haskell, it is just not as popular a language as others.[1] Any ANTLR target language wou
by wspeirs 10y ago
It's too bad this is written in Haskell. I don't have anything against Haskell, it is just not as popular a language as others.[1] Any ANTLR target language would have been a solid choice.[2] This way more of the community could contribute. This is an invaluable tool if we're truly going to see a shift from C (or C++) to Rust.
[1] http://pypl.github.io/PYPL.html http://pypl.github.io/PYPL.html
[2] http://www.antlr.org/download.html http://www.antlr.org/download.html
- vvanders 10y agoI've used ANTLR in anger a few times and for some reason it's always left a bad taste in my mouth. I always seem to spend more time debugging how ANTLR works rather than doing the work I set out to do. Granted most of my use cases was building a simple DSL so it might be different when talking about whole source conversion.
- partisan 10y agoThe documentation is really spare, but coincidentally, the books written by Terrence Parr are good reads and with the right time investment, make dealing with Antlr feel less like voodoo and more like software engineering.
- DanWaterworth 10y agoI think people interested in compilers are disproportionately Haskell inclined.
- steveklabnik 10y agoThe author told me that one of the reasons he chose Haskell was that there was already great tooling around working with C source code: https://hackage.haskell.org/package/language-c https://hackage.haskell.org/package/language-c
- masklinn 10y agoIn fact they have explicitly documented it: http://jamey.thesharps.us/2016/07/translating-c-to-rust-and-how-you-can.html http://jamey.thesharps.us/2016/07/translating-c-to-rust-and-... > The only reason I wrote Corrode in Haskell is because I couldn't find a complete enough C parser for Rust, and I was already familiar with the language-c parser for Haskell.
- Retra 10y agoHaskell is very popular. It's a top 40 in a field of thousands. It's more popular than Rust.