Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ironically, 97% of the code is written in F#.


Interesting. I wonder the reason for this

This is totally contrived, but I want to believe that this project is a learning project that the creator started to use F# to write a compiler. Perhaps the creator is experienced with imperative programming using C and wanted to do more programming in F#

The reason to do such a thing is that implementing a compiler in a functional programming language results in very elegant functional code. There's an "Aha!" moment when you drop the imperative way of thinking and see how functional thinking can be expressive and concise, yet so very different

I could see myself doing the same thing. It's a seductive intellectual challenge, difficult but achievable, to learn functional programming and write a compiler from scratch


Well, functional languages are often considered a great choice for a compiler, but C is simpler to implement to F#, I'd imagine. The README says it has unfinished F# support too.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: