3 ms·
> I do get that Haskell is useful to be taken as a tool for these kind of code transformations (at least I have seen quite a few of those) but I am always a bit
by masklinn 10y ago
> I do get that Haskell is useful to be taken as a tool for these kind of code transformations (at least I have seen quite a few of those) but I am always a bit surprised that people would start such a project in a language that has -per se- nothing to do with either the source or the target language.
The author explained this in a blog post[0]: Haskell has a very complete C parser library with a nice API[1] which the author already knows, Rust doesn't; furthermore since one of the project's goal is to be as syntax-directed as possible the translator is straightforward and should be understandable with very little understanding of Haskell (which can be bootstrapped from understanding Rust)
[0] 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-...
[1] http://hackage.haskell.org/package/language-c http://hackage.haskell.org/package/language-c
- wink 10y agoThanks, I had overlooked that explanation. My -general- point still stands, appaently Haskell is very good at this and the people undertaking these projects choose to value this over ease of contribution :) (says someone who just doesn't come to terms with Haskell)