2 ms·
> This is the sort of thing that needs to be deeply integrated into the compiler, so the author of that feature would necessarily need to understand the data s
by tom_mellior 9y ago
> This is the sort of thing that needs to be deeply integrated into the compiler, so the author of that feature would necessarily need to understand the data structures and architecture of the compiler. At that point, it's probably easier and more reliable to write it as a compiler extension.
That's exactly what this language allows you to do, except that it's nicer than C++ and can be interleaved with the application you want to compile with the extended compiler.
> That's too low level, the language needs to provide a useful model of abstraction above that to be better than just modifying the code of the compiler itself.
I agree that a higher-level API would be useful, too. For high-level things, but not necessarily for adding goto.
- couchand 9y ago> it's nicer than C++ What do you mean by nicer? The tradeoff here seems to be exchanging useful functionality for a leaner, more limited interface. I'm not sure I agree that the right decision is to forsake the full power of the LLVM interface. > can be interleaved with the application you want to compile with the extended compiler. On this we can agree - abstractly, that would be a very powerful thing. Practically, though, what's the cost? How would developers expressively write useful extensions? How do these extensions interact? Answering the hard questions about how this would actually work is going to take some serious thought. > I agree that a higher-level API would be useful, too. For high-level things, but not necessarily for adding goto. I'm not sure goto is all that great of an example, except for the dimension of implementability in a README file.
- tom_mellior 9y ago> What do you mean by nicer? People have lots of more or less subjective preferences concerning programming languages. To me, this programming language looks more productive and more comfortable to use than C++. You might reasonably disagree. > Answering the hard questions about how this would actually work is going to take some serious thought. And/or experimentation. No programming language design was ever gotten right on the first try. Programming languages evolve with use, in unplanned and unplannable directions. It's completely fine to do this and see how it comes out. In a cousin comment, you wrote "Always fun to see new language ideas and watch them grow." This is exactly that.