Languages Within Language: Could Your Second Language Be a Domain-Specific Language?

A Coffee Nerd’s Take On The Linguistics of Coffee

Joseph Low
4 min readOct 30, 2022
Photo by Joshua Hoehne on Unsplash

One of the benefits of learning a second language is that you will learn to perceive the world differently. Languages aren’t created in isolation — they’re formed within the cultural context of the society it originates from.

You might pick up terminologies specific to that culture. In Japan, the term mattari refers to the state of just chilling out and not doing anything in particular. Sure, I’ve just explained it to you in English, but it's only when you use it in conversation with someone who understands it too, that you’d realise the efficiency of using a single word to carry the entire context. It conveys a far more nuanced meaning that a definition based on another language could never convey.

Learning about another culture may also make you more cognisant of implicit assumptions and thought patterns within your own culture. For example, power distance is a measure of the importance of hierarchy and rank in communication. A culture with a high power distance means that speaking against the Highest Paid Person’s Opinions (HIPPOS) may be more difficult than in a culture with a low power distance. Some languages are inherently more deferential and implicitly encourage a certain style of communication. Comparing and contrasting how different languages address each other may lead you to learn more about giving feedback or communicating effectively upwards and downwards.

The above arguments apply to natural languages, the language we use to speak to each other. But could it apply to learning other forms of language as well?

All natural languages are general-purpose languages (GPLs) which can be used to create solutions to any kind of problem. A domain-specific language (DSL) is a language used to create solutions to specific problems. Let’s take the problem of evaluating the quality of a coffee.

This coffee is pretty sweet and juicy, it’s not too sour and doesn’t have any weird flavours to it. There are infinite ways to express the quality of coffee in English. I could also use it to express anything, not just coffee. English has a generalised purpose, it’s a GPL.

Now here’s a look at a DSL for this problem.

Specialty Coffee Association Coffee Cupping Protocol

The above is a scoring sheet for a standardised way of tasting coffee termed coffee cupping. There is a graphical scale used to evaluate the coffee enabling efficiency in communication; the different dimensions formalise the implicit assumptions in tasting coffee about what we are perceiving; a standardised reference defining each dimension captures nuance. In other words, DSLs too reap the benefits I’ve shared above about second languages.

Learning about coffee has enabled me to be more immersed in experiencing coffee culture and have more fun evaluating the coffee I drink on a daily basis — Learning a DSL is akin to learning a second natural language i.e. A second GPL.

The coffee DSL I’ve shared above is an example of an external DSL. These are languages which have their own syntax and other examples include musical notation, mathematics or SQL. In comparison, internal DSLs, are languages which inherit the syntax of the host language i.e. A language within a language.

Technically, many DSLs we consider external DSLs, are internal DSLs as they are embedded within the English language. In practice, we only consider it an external DSL if it has its own community and its own tools to the extent that you would call it a stand-alone language.

From another angle, we can also better understand the difference between external and internal DSLs by drawing a distinction between natural languages and programming languages. A programming language is only considered an internal DSL if it is embedded within another programming language and not a natural language. So even though SQL has lots of English in it, we would still consider it an external DSL, and not an internal DSL for database applications.

The inverse would be true as well — A natural language is considered an internal DSL if it is embedded within another natural language. For example, if we communicate taste in English using only the five senses of taste (sweetness, sourness, bitterness, saltiness, umami) and we created a derivative language to describe coffee solely as measures of these five senses, then that language would be considered an internal DSL.

I started writing this article with the hypothesis that we could reap the benefits of learning a second language by learning a DSL. I now think that this only holds true when the domain is either large enough or of special significance to you. Mathematics, music, coffee, design, engineering and many other domains all have unique ways of perceiving the world. Maybe besides developing expertise in different languages, developing expertise in these different domains would provide us with the insights to view the world from different perspectives.

--

--

Joseph Low

I write once a week, drawing analogies between design, web3 and life| Podcast Host @ The Alternative Hustle | Blockchain Engineer@ GB | Design & AI @ SUTD