5 ms·
I've never heard anyone say Ada was easy to compile. Also, I heard its uptake was slowed by how hard it was to get the early compilers working. So, where did yo
by nickpsecurity 11y ago
I've never heard anyone say Ada was easy to compile. Also, I heard its uptake was slowed by how hard it was to get the early compilers working. So, where did you see an easy one? Seriously, because Ada still needs a CompCert (or at least FLINT) style certified compiler. An easy Ada compiler would be a nice start on that.
- pizlonator 11y agoI always thought that Ada was easy to compile in the backend (i.e. the moral equivalent of what B3 does) but challenging on the frontend because of how large the language is. Could be wrong though. The frontend is usually the hard part IMO. In WebKit, we have 100,000 lines of code for our "frontend" (i.e. the DFG compiler) and 50,000 lines of code for our "backend" (i.e. B3). That split is really interesting.
- nickpsecurity 11y agoIt's what I thought, too. The split may come from the fact that the front-end is more complex, richer in information, harder to analyze, and harder to transform. The more you can do with it the more code it takes to represent. That's my hypothesis. Far as Ada, I figured it would be difficult due to the large number of language features and complexities of analyzing a program for safety w/ all its rules. And any interactions that might emerge in that between features and rules. Could be easier than I think but my default belief is that it's not easy.
- sklogic 11y agoI am talking about the backend optimisations, not the frontend parts. Ada frontend got tons of sweet static information for the backend to consume.
- nickpsecurity 11y agoThat makes more sense. Did you ever work on any Ada compiler I might have heard of?
- sklogic 11y agoNothing fancy, I was simply implementing a subset of Ada for fun. I find it is the quickest way to learn or explore a language - write a compiler for a subset of it. Frontend was awful and I never finished it, but the LLVM-style backend wad very easy to build.