|
I've started down the road of language design recently and have committed to roughly these goals: 1. Making "Algol 2020" is only interesting if you also throw person-decades of effort into making it competitive in production. I want to do other things with my time, therefore anything I attempt should not lead to that, which produces these other requirements to create a small yet useful language: 2. The implementation must leverage existing languages in a way that is uncomplicated to the user. Which means that it either compiles to some form of interpreter or to generated source code. 3. The language must focus on fully leveraging a specific data structure or family of data structures. What is and has long been fashionable in PL discussion is to elaborate upon symbolic expression. You do need some symbol definition to have a language, but the preferred orientation we use for many data structures is spatial: "top of stack", "bottom of tree", "traverse the graph", "loop over the array". Engaging with the vocabulary of the data in its context, and simply working to generalize upon that vocabulary and the bookkeeping it needs(iteration counters, selection markers, error cases etc.), rather than the generalities of algorithm definition, leads directly towards a tighter language. We can define many algorithms very well, and we're paying more attention to concurrency lately, but the software we're writing still mostly isn't about algorithms themselves. You don't end up writing one million lines of code because you have a mega-algorithm that's just really hard to express. Consider regular expressions: a little string matching language, which can be usefully explained in a page or two. The idea of them has been around since the 50's, yet all the hip, popular languages today have implemented some syntax for them, making regex defacto one of the most common and long-lived programming languages in existence, outdoing "big" languages by many measures. And ideally I'd like to engage in those terms: a language so small you don't really notice except to think "gee, that's handy." |