Today, an interesting discussion with a colleague. We're going to create a wrapper for WCF's channels, that will handle the Close(), Abort() and Dispose() correctly. This wrapper is to be used instead.A coworker argued that this was like creating a domain specific language. He opposed the idea, saying it would impose a certain way of working on every software developer that he considered intrinsically wrong. He'd rather overload the 'using' keyword. (Now, AFAIK, this is not possible in C#)So, does it? Does creating a set of classes and using them strictly instead of classes from other libraries (i.e. forbidding use of Channel) make a DSL?When does 'code' become a DSL? I always understood a DSL as a new language with its own grammar, keywords, parser, tokenizer, etc.. Is the term becoming more vague with use?class ChannelWrapper : IDisposable{    void Dispose(bool disposing)    {        ...        try {            channel.Close();        }        catch (CommunicationException) {            channel.Abort();        }        catch (TimeoutException) {            channel.Abort();        }    }}
When is code considered a domain specific language
c#;dsl
This isn't a DSL, it's simply an API. An API provides a set of building blocks for use within the language the application programmer is using. If it's a set of building blocks for use within another programming language that another programmer will be using, it's a set of bindings.A domain-specific language is a newly invented language, usually one that is simpler than a programming language, often one in which a non-programmer can express useful content. HTML is almost too complex to be called a DSL. The configuration file formats of many small tools are better examples of domain-specific languages.