How about learning a domain-specific language?

When it comes to learning new programming languages and making a career of it, there’s a group that seldom gets much attention. As an expansion to a video @shanselman put out a few weeks ago, this video takes a look a what a domain-specific language is:

https://youtu.be/J4i3yhpnyys

In this video, Erik responds to a TikTok video by Scott Hanselman about the best programming languages to learn, adding an important dimension that Scott didn’t cover: domain-specific languages (DSLs). Erik makes the case that languages like AL — the language behind Microsoft Dynamics 365 Business Central — represent a massive, often overlooked career opportunity with high demand, good pay, and excellent job satisfaction.

Scott Hanselman’s Advice: Any Language Can Lead to Success

Erik kicks off the discussion by referencing a short video from Scott Hanselman of Microsoft, in which Scott lists off a variety of general-purpose programming languages — C#, Java, JavaScript, Python, Ruby, Rust, Go — and delivers a simple message: you can be successful in any programming language. Scott’s key points are:

  • Don’t get hung up on the details of a specific language — think about the larger systems languages live within.
  • Pick a language, learn it, see if it feeds your spirit, and check the job market in your area.
  • Ignore people who say a language “sucks” — all your favorite websites are probably written in a language someone else thinks is terrible.
  • Success is a pretty good metric, and you can learn any language and be successful in it.

General-Purpose vs. Domain-Specific Languages

All the languages Scott mentions — C#, Python, Go, JavaScript — are what Erik defines as general-purpose (generic) languages. You can take any of them and build a compiler, an operating system, a word processing tool, control logic for train brakes, rocket engine throttling, traffic lights, or database systems. They’re designed to do anything.

But there’s another category that Scott didn’t mention: domain-specific languages (DSLs). A great example that bridges the gap is SQL (sometimes pronounced “sequel”). SQL isn’t a general-purpose language — it was built in the early 1970s at IBM specifically to get data in and out of databases. While people have done crazy things with it (like rendering 3D images), it’s not efficient for general-purpose work. It occupies a middle ground: not generic, but widely known.

What Is a Domain-Specific Language?

A domain-specific language is a language that has been designed — typically inside a single system — to work really well and do everything you need within that system, with minimal overhead. You could build an ERP system in C# or Python, but you’d end up writing enormous amounts of abstraction to avoid boilerplate code. If you take that abstraction far enough, at some point it becomes a language in its own right — and that’s exactly what has happened with DSLs in the ERP world.

Erik highlights three examples from the Microsoft ecosystem:

  • AL — the language for Microsoft Dynamics 365 Business Central (an ERP system)
  • X++ — the language for Microsoft Dynamics 365 Finance and Operations (another ERP system)
  • DAX (Data Analysis Expressions) — the language for Power BI, mainly used to describe values, columns, calculations, and expressions

All three are full-fledged languages with compilers and development environments. Yet if you visit Microsoft’s developer portals, you won’t find them listed alongside C#, Python, or JavaScript. They’re treated as “second tier” in visibility — even though they are absolutely central to massive parts of the industry.

ERP Systems and Why DSLs Exist

ERP (Enterprise Resource Planning) systems are the software that controls and runs everything inside a company — payroll, accounting, inventory tracking, orders, web orders, warehouse management, and much more. The business logic in these systems (calculating sales tax, determining inventory order, computing accounts receivable balances) is typically written in a language specifically designed to solve these problems efficiently.

No two companies are exactly alike. If your company has two, three, or four things that make it better than the competition, then the software that controls your company needs to support those differentiators. Someone needs to come in and program that in a domain-specific language — and that’s where the jobs are.

The Job Market for AL Developers

Speaking specifically about AL, Erik notes that the demand for AL developers worldwide is only rising. More and more companies are using these systems, and more companies need custom functionality created and added. Key characteristics of working in this space include:

  • Many jobs available all around the world
  • Well-paid positions
  • Good employers who treat people well
  • Direct interaction with happy customers
  • Very high job retention — people stay in these roles for a long time

Erik himself has been working with the AL language (and its predecessors) for over three decades.

AL in Practice: A Point of Sale System in 200 Lines

To demonstrate the power and conciseness of a domain-specific language, Erik shows a point of sale system written in AL using Visual Studio Code. In just 200 lines of code, the program:

  • Works with a sales header (the top of an invoice or order)
  • Defines an abstract UI layout — it doesn’t matter whether the POS runs on a phone, tablet, big screen, small screen, or web browser
  • Shows status, number, customer information, and sales lines in a subpart
  • Integrates a barcode scanner
  • Displays totals in a fact box
  • Defines an action bar with “New Receipt” and “Pay” functions
  • Automatically prepares a new receipt when the page opens
  • Handles barcode scanning — either adding to an existing line or creating a new one
  • Creates a new invoice line with full business logic (totals updated, sales tax calculated) in about nine lines of code
  • Processes payment by setting a payment method and posting the invoice

This conciseness is possible precisely because AL is a domain-specific language built for this kind of work.

A Look at the AL Development Environment

Here’s a simple example of AL code — a page extension that extends the Customer List page in Business Central:

// Welcome to your new AL extension.
// Remember that object names and IDs should be unique across all extensions.
// AL snippets start with t*, like tpageext - give them a try and happy coding!

pageextension 50100 CustomerListExt extends "Customer List"
{
    trigger OnOpenPage();
    begin
        Message(GenerateAwesomeMessage(TODAY()));
    end;

    local procedure GenerateAwesomeMessage(T: Date): Text
    var
        d: Integer;
        m: Integer;
        y: Integer;
    begin
        d := 3;
        m := 4;
        y := 5;
        newProcedure(d, m);
    end;

    local procedure newProcedure(var d: Integer; var m: Integer): Text
    begin
        for d := m to m * 5 do begin
            for m := d to d * 5 do begin
                if d = m then
                    exit('Test!!!');
            end;
        end;
    end;
}

This code demonstrates several key AL concepts: page extensions (extending existing system pages without modifying the base code), triggers (like OnOpenPage that fire automatically), procedures with typed parameters, and Pascal-based syntax including begin...end blocks, := for assignment, and for...to...do loops.

Every AL project also includes an app.json manifest file that defines the extension’s metadata, dependencies, and configuration:

{
  "id": "89c15b07-f4d3-4d80-847c-0d9b050c2b50",
  "name": "Video5",
  "publisher": "Default publisher",
  "version": "1.0.0.0",
  "dependencies": [
    {
      "id": "63ca2fa4-4f03-4f2b-a480-172fef340d3f",
      "publisher": "Microsoft",
      "name": "System Application",
      "version": "16.0.0.0"
    },
    {
      "id": "437dbf0e-84ff-417a-965d-ed2bb9650972",
      "publisher": "Microsoft",
      "name": "Base Application",
      "version": "16.0.0.0"
    }
  ],
  "platform": "16.0.0.0",
  "idRanges": [
    {
      "from": 50100,
      "to": 50149
    }
  ],
  "runtime": "5.0"
}

Note the dependencies on the System Application and Base Application — these are the core Microsoft packages that provide the business logic and system functionality that AL extensions build upon. The idRanges section defines the object ID range allocated to this extension, ensuring no conflicts with other extensions or the base application.

Modern Tooling, Not an Old Language

Erik addresses a common criticism: AL’s syntax is based on Pascal, which dates back to the 1960s-70s. But as he points out, C’s syntax was defined in the 1970s too — it’s just syntax. The underlying principles (if statements, expressions, true/false branches) are the same regardless of syntax.

The AL development experience is thoroughly modern:

  • Development happens in Visual Studio Code with the AL Language extension
  • The compiler runs on .NET technology, just like the C# compiler
  • There’s a full language service providing IntelliSense — type a record variable and press dot to see all available fields and business logic
  • Source control is managed through Git
  • The entire build and deployment pipeline uses modern DevOps practices

Beyond AL: A Broader DSL Opportunity

While Erik speaks primarily about AL, he emphasizes that the same opportunity exists across the domain-specific language landscape. You could search-and-replace “AL” with:

  • DAX for Power BI
  • X++ for Dynamics 365 Finance and Operations
  • ABAP for SAP
  • And many other domain-specific languages across the industry

Conclusion

Scott Hanselman’s advice is sound: pick a language, learn it, and you can be successful. But Erik adds a crucial dimension that’s often overlooked. Domain-specific languages like AL represent a massive, growing corner of the industry with abundant job opportunities, excellent retention, direct customer impact, and a modern development experience. If you’re considering your next language to learn, don’t just look at the usual suspects — consider the world of domain-specific languages where there’s a ton of opportunity for great success, great jobs, and working with people who really know their stuff.