Skip to content
BENIBIX Learn

Markup Languages and DSLs

Level 1 · How languages differ

Languages that are not for everything. Markup that only describes a page, small languages built for one job, and coding with blocks in Scratch.

Course contentsLesson 4 of 12

Level 3 · General-purpose and systems languages

  1. Python, Java and C#
  2. C, C++, Rust and Go

Level 4 · Languages for phones

  1. Swift, Kotlin and Dart

Level 5 · Data and functional languages

  1. R, Julia and MATLAB
  2. Haskell, Scala and Elixir

Level 6 · Scripting languages

  1. Shell Scripts, Perl and Lua

After this lesson you can

  • Tell markup from code that can work things out
  • Name three domain-specific languages
  • Say what block-based tools like Scratch are for

11 mincovers 4 glossary entries

Worth reading first: Programming Language Basics

Which languages do one job, or only describe

Not every language is built to do anything. A markup language only labels the parts of a text, such as this is a heading or this is a link. HTML, which every web page is written in, is one. Markdown, used for notes and README files, is another. They describe, but they never work anything out.

That is the test. A programming language can add, decide and repeat. HTML cannot: it has no if and no loop. So it is a fair point when people say HTML is not a programming language. It is still a real skill, and every web developer uses it daily.

A domain-specific language, or DSL, is a small language made for one job. SQL asks a database for data. CSS says how a web page should look. A regular expression describes a pattern of text to find. Each is far shorter than a general-purpose language for its own job, and useless outside it.

Python, Java and C# are the opposite. They can build almost anything. Most coders use one or two of those, plus a few DSLs. A web app might be written in Python, with SQL for its data. CSS sets its looks and HTML holds its pages.

Block-based programming takes away the typing. You snap blocks together on a screen, and each block is one step, such as repeat 4 times or move 10 steps. The shapes only fit where the rules allow. So a syntax error cannot happen.

Scratch is the best-known block tool. It is free, it runs in a web browser, and it was made at MIT for children to build games and stories. The ideas are the real ones: variables, loops, ifs and events. Only the typing is missing.

The common mistake is thinking blocks are not real coding. A child who builds a game in Scratch has learned loops and conditions. Moving to a typed language later is learning new spelling, not new ideas.

html
<h1>My Trip</h1>
<p>We spent <strong>3 days</strong> in Rome.</p>
HTML labels each part: a heading, a paragraph, a bold phrase. It describes the page and works nothing out.
Some languages build anything, some do one job, and some only describe. Blocks teach the same ideas without typing.

Worked example

Jack's daughter makes a game

Jack's 9 year old daughter builds a catch the apple game in Scratch. It uses a score variable, a forever loop and an if for each catch.

At 12 she moves to Python. The first week is spent on typing and colons. The loop and the if she already knows.

The words for this lesson4

Check yourself

Why is HTML called a markup language and not a programming language?

Finished this lesson?

Marking it complete also marks its 4 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.