Hacker News new | ask | show | jobs
by Banana699 1838 days ago
Haskell's GHC compiler (eventually) transforms haskell into a "fictional assembly" called C--. It has no relation to C at all except in the generic sense that it's a low-sugar low-semantics low-level language, intended to be a machine-friendly view of high level haskell. Maybe the author meant that relationship in the generic sense. (C--could be transformed to C to be read or compiled, but it could equally be transformed into LLVM IR or native.)

Some languages do compile to C (if only for the portability and compiler quality). C++'s first compiler used such a technique.

1 comments

I wasn't talking about C--, more about how GHC essentially exposes C libs for its primitives. Also want to clarify that Yatima doesn't compile to Rust either.

The comparison to Haskell/C was an imperfect analogy, I was just trying to express that "functional programming language that integrates with Rust" seems like a mostly unfilled niche that Yatima could exist in