Question

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.

Was it helpful?

Solution

UPDATE 2:

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.


UPDATE 1:

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!

OTHER TIPS

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.

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".

https://msdn.microsoft.com/en-us/library/mt270235.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top