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

As noted in the article I posted earlier, Ada isn't that difficult a language to compile, it's just that early Ada compiler developers assumed it was hard, so they made it hard.

The GNAT Ada compiler is OSS, so you can look it yourself. It has a hand-crafted lexer (for speed), but otherwise it's not complex. It uses recursive descent (for good error messages), but lots of compilers do that & it's not hard to understand either. (If you don't understand creating a recursive descent parser then you'll need to learn that, but it's a one-time cost to learn about that).

Ada is really easy to parse compared to C++. There aren't the backwards-compatible-with-C historical stuff that makes things complicated.

Ada has built-in support for tasks, including safe communication mechanisms for them. Many other languages today do too, so that's not such a big deal today.

Generating very good code is hard in any language. GNAT "cheats" by building on gcc, which already works on this problem. GNAT parses source code & then generates the internal structures needed for gcc to do its thing. Many language implementations parse & then pass things on to an infrastructure (gcc or LLVM), so that's not unusual.

PL/I is complicated in part because of its baroque "automatically figure out all the conversions" rules. Ada in general makes you be explicit about types, so that is a non-issue.



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

Search: