Hacker News new | past | comments | ask | show | jobs | submit login

It is not at all the point of this talk, but as a side-note:

> …the functional programming language Haskell [compiles] via C, for example…

This is not correct. GHC, the de facto Haskell compiler, targets an intermediate language called C--, which resembles but is not identical to C and was explicitly designed as a compiler target. The point that some languages do compile to other high-level languages is true—Nim and Haxe being some good examples—but it is not true of Haskell.




Historically speaking, GHC has had C backend option to facilitate porting.

https://downloads.haskell.org/~ghc/9.4.2/docs/users_guide/co...

> -fvia-C

> Use the C code generator. Only supposed in unregisterised GHC builds.

> This is the oldest code generator in GHC and is generally not included any more having been deprecated around GHC 7.0. Select it with the -fvia-C flag.

> The C code generator is only supported when GHC is built in unregisterised mode, a mode where GHC produces “portable” C code as output to facilitate porting GHC itself to a new platform. This mode produces much slower code though so it’s unlikely your version of GHC was built this way. If it has then the native code generator probably won’t be available. You can check this information by calling ghc --info (see --info).


Given how many people fundamentally refuse to distinguish between C and C++, this may be a lost cause.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: