Since C# 3.0 we’ve had a similar facility in C#. This means an opportunity for another war.
I’ve started to see little object initialisation trees appearing in my code, and they start to look like a declarative internal DSL. I should post a real example some time. Anyway, this can only mean one thing: we need a snappy name for these things.
About three years ago I experimented with internal DSLs in C++. I didn’t know to call it that at the time (I’m not sure when the term was coined). It really means twisting the features of an existing language to make what feels like a new language.
The purpose of my DSL was to allow C++ programmers to naturally express database queries that would be executed against an RDBMS as standard SQL queries. In other words, it had exactly the same aim as LINQ, although again I wasn’t to know that at the time.
The starting point was a couple of template classes called column and table, which serve the purpose of making the names of tables and columns visible within the C++ type system.