PROGRAMMING : Next FAD on the horizon
Remeber I was complaining about there being no decent Fads in the computer world at the moment? Anyhoo, I have found them
a) Ruby - well I've already fallen into this trap, and have the PickAxe to prove it :-)
b) LOP - Language Oriented Programming
Here is an interesting introduction to LOP, by the co-founder of IntelliJIDEA. The basic idea is to make compiler compilers so unbelievably easy that you are more inclined to write a DSL (domain specific language) than you are to try and hack your way through your normal implementation language. Takes the DRY (don't repeat yourself) principle to the extreme!
How to make it easy? The right editors and the right format. Don't be constrained by text (something I've always dreamed of... why not have an explanatory diagram in the source code, but this goes even further, eg GUI builders), and store code as ASTs (Abstract Syntax Trees).
He shows nicely how you can define a language as a pattern language for nodes in an AST, and that an editor (kind of text) can automatically allow sophisticated, and always correct, editing. how? Because each node of the AST is a little box to type in/select options from - and it looks just like code!
The only thing I don't like about the article are the examples - they are really hard to follow, and these DSLs are supposed to make life easier! Maybe I'm just not knowledgable about the domain of the examples...
Something to watch
a) Ruby - well I've already fallen into this trap, and have the PickAxe to prove it :-)
b) LOP - Language Oriented Programming
Here is an interesting introduction to LOP, by the co-founder of IntelliJIDEA. The basic idea is to make compiler compilers so unbelievably easy that you are more inclined to write a DSL (domain specific language) than you are to try and hack your way through your normal implementation language. Takes the DRY (don't repeat yourself) principle to the extreme!
How to make it easy? The right editors and the right format. Don't be constrained by text (something I've always dreamed of... why not have an explanatory diagram in the source code, but this goes even further, eg GUI builders), and store code as ASTs (Abstract Syntax Trees).
He shows nicely how you can define a language as a pattern language for nodes in an AST, and that an editor (kind of text) can automatically allow sophisticated, and always correct, editing. how? Because each node of the AST is a little box to type in/select options from - and it looks just like code!
The only thing I don't like about the article are the examples - they are really hard to follow, and these DSLs are supposed to make life easier! Maybe I'm just not knowledgable about the domain of the examples...
Something to watch
0 Comments:
Post a Comment
<< Home