3 ms·
If you rewrote only part of a large C++ project in Haskell, is there a way to link it back in again?
by skybrian 9y ago
If you rewrote only part of a large C++ project in Haskell, is there a way to link it back in again?
- aeorgnoieang 9y agoCall Haskell from C (not C++) seems pretty easy: - [Calling Haskell from C - HaskellWiki](https://wiki.haskell.org/Calling_Haskell_from_C https://wiki.haskell.org/Calling_Haskell_from_C) And the FAQ on the Haskell wiki directly addresses this too: - https://wiki.haskell.org/Introduction#I_already_have_a_large_application_in_C_or_C.2B.2B https://wiki.haskell.org/Introduction#I_already_have_a_large.... So apparently it is doable!
- mrkgnao 9y agoHN supports a funky subset of Markdown. :(
- concede_pluto 9y agoOnly paragraphs, code literals, italics, and URLs. https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc
- antientropic 9y agoIt pulls in a huge runtime system, though (including stuff like garbage collection). This makes it much heavier than calling some Rust code.
- marcosdumay 9y agoTrue, where "huge" means something around 10MB. For many projects that is a showstopper.
- mrkgnao 9y agoThe URL is slightly misleading: yes, you can call Haskell from C++. https://stackoverflow.com/questions/3859340/calling-haskell-from-c-code https://stackoverflow.com/questions/3859340/calling-haskell-...
- kreetx 9y agoIt definitely can, but if you're asking for an out-of-the box support, then it's probably not as easy to use as Rust. Then again, if you plan to rewrite your code base, then why not invest -- typed IO is a big thing.