I heard Microsoft developed a programming language called M.

Can someone explain the use of M and how a C# programmer can benifit from M.

  • Ug, that page has been deleted. – Michael Oct 20 '14 at 16:12


In July 2015, Microsoft released a heavily revised version of M called Power Query. It is described as a "formula language", and is no longer about modeling per se.


It's been almost four years since I wrote this, and my guess (that "it's not very useful") turns out to have been shared by a lot of folks. M is long since defunct and was never released. MS switched efforts to OData instead.

To understand the point behind M, you have to understand some brief history:

  • In the mid-1990s and the early 2000s, there was something of a mini-movement in software engineering to encourage business folks to write and develop software. This was seen as an effort to reduce the complexity of large software projects by cutting out the middleman of software developers for modeling large business apps. Many management teams loved the idea, since now business people could contribute directly to software development.

  • There were a lot of strategies that people used to try to increase business-analyst engagement. One of the more popular ones was model-oriented architecture. Under this scheme, business people could specify models directly using some kind of visual language (e.g. UML), which would then be generated into code. This would be not unlike having some kind of visual designer that created autogenerated database columns and tables as well as associated C# classes tagged with the right NHibernate tags.

  • Because it's inconvenient to learn a new programming language merely for the sake of modeling a few concepts, most business folks couldn't understand their generated code. Indeed, most folks just wanted to hand a stack of modeled code to developers and say "here, run with this". In general, the quality level of the generated code was low.

  • Ultimately, the movement died out once it became apparent that having business folks who couldn't understand the software they'd just written was problematic. The tools were partly to blame, too: slick boxes-and-arrows diagrams look great in PowerPoint presentations, but have ambiguous representations in software. The differences in intent between the possible implementations were often too subtle to capture in a tool.

This is where M comes in. Microsoft is betting that tools have improved to the point where it's now possible to model things more directly. They've obviously learned from the mistakes of others, since M is a textual language (rather than the slick boxes-and-arrows language of earlier visual modeling tools). Think of M as another version of UML, but with a lot of the cruft stripped away, and focused more or less exclusively on modeling objects (rather than sequences of events, actors, etc., and all the other things UML can be used to model).

IMO, it's not very useful right now because there isn't enough of a mindshare to make working with it effective. Part of the utility of a language is the tools it works with, and right now there are very few of those (actually, right now I can't think of a single third-party tool that helps you with M).

Sidebar: someone needs to give the Microsoft folks some SEO Marketing 101 classes. Zero of the top ten results for "m dsl" are even close to talking about DSLs: one result is for softball league in Detroit; one is about mobile phone digital subscriber lines; et cetera. Don't name your new tool after a letter of the alphabet!

| improve this answer | |
  • To the point of doing a search for m dsl... try doing a search for c dsl. M is a language spec, it has just has much noise as B, C, and D ... which are all programming languages. – Matthew Whited Jun 25 '10 at 15:18
  • It's been almost six years since you wrote this and M is either completely different to what you have described or it is now extremely useful. Thanks for the background info. – Jay Killeen Jan 29 '16 at 4:06
  • 3
    The shattered remnants of M were remade into Power Query with some extra goodness and new ideas. Power Query is not a modeling language like M originally was, but rather is a tool for interrogating data. More info here: msdn.microsoft.com/en-us/library/mt270235.aspx – John Feminella Jan 29 '16 at 18:37
  • Descending chronological order is sensible; and ascending chronological order is sensible; but Middle-Out is a completely insensible chronological order. I have made a minor edit to make the sequence of your post sensible without reviewing the edit history. – Pieter Geerkens Jul 7 '17 at 17:05
  • Is it different from M#? I've seen the M# website and I've confused about those. – Ahmad Payan Aug 29 '17 at 2:58

A quote from Microsoft's M language specification:

The Microsoft code name "M" Modeling Language, hereinafter referred to as M, is a language for modeling domains using text. A domain is any collection of related concepts or objects. Modeling domain consists of selecting certain characteristics to include in the model and implicitly excluding others deemed irrelevant. Modeling using text has some advantages and disadvantages over modeling using other media such as diagrams or clay. A goal of the M language is to exploit these advantages and mitigate the disadvantages.

| improve this answer | |
  • 14
    Did they just say modeling in clay? I can see that being problematic as a business solutions model, as the process always ends in getting fired. – Dan Bryant May 23 '10 at 13:51

M stands for mashup queries, and is used in PowerQuery and PowerBI Desktop. It has been renamed to Power Query Formula Language. It is informally known as "M".


| improve this answer | |
