Hacker Newsnew | comments | show | ask | jobs | submit login

> it would be nice if it was in C rather than Haskell too. imo its highly likely nobody wants to touch Haskell if they have a choice.

This is roughly a "port" of the LLVM "Kaleidoscope" tutorial, which is originally written in C++. There's also an O'Caml version.

Haskell is (not coincidentally) an excellent language for writing compilers. "nobody wants to touch Haskell" is just trolling that earned you a downvote.




oh sure, there is a nice mapping between parser combinators and lbnf, however most programmers have little experience of fp and don't want to touch haskell for anything. this might be unpopular, but it has the unfortunate property of being a true statement. i'm happy to be downvoted for 'trolling'

i had seen that kaleidoscope tutorial in the LLVM docs before but didn't remember it particularly or find it helpful - perhaps its the presentation but this site is much more polished than that part of the llvm docs. granted they make the explicit choice to not use lexer/parser generators but that is not as practical in c/c++ as it is with haskell and adds a lot of needless cruft imo.

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: