Or General Purpose Languages are what we as programmers are used to dealing with on a daily basis. They can be object oriented, functional and imperative. The usage or the domain they can operate on is vast. To rephrase: we can come up with a set of instructions in any general purpose language that can solve almost any problem (I’m saying almost because you probably can’t write a piece of software to end world hunger, although it would be nice).
To name a few GPLs: Kotlin, Java, PHP, C, Hodor (yes there’s a programming language called Hodor)
Or Domain Specific Languages are not so versatile, they also have a syntax but the domain of the problems they can solve is restricted to something more specific. This restriction helps making the syntax clearer, more focused, easier to learn, offers less room for errors and is optimised for that specific domain. If we think about a Chef’s Knife (DSL) and a Swiss Army Knife (GPL) both are good at cutting something, the Swiss army knife will be good at a lot of things besides cutting, but when you want to cut a raw stake it’s much easier with the Chef’s knife.
A widely popular DSL that most software engineers will know about is SQL, but there are many.
You might ask yourself: how can you say it’s a DSL when it’s written in Kotlin? A DSL should be a language. It’s in the name.
Normally I would agree, but as someone (I don’t remember now) from a popular English dictionary once said something along these lines: “the definition of a word will evolve and be updated in the dictionary based on how the majority of the population is using it”.
So when we say Kotlin DSL or we refer to a DSL within a language what we usually mean is that we have a construct that limits our choices based on a specific domain or context while still offering the syntax highlighting and code completion we’re so much in love with in our IDEs.
My personal goal is to learn all I can about the technologies I work with and continuously improve my programming skills.