C has always had support for higher-order functions using function pointers. Today we have added this feature to our MPS-C implementation. We have cleaned the syntax up a bit (C’s syntax is awful here!) to resemble Scala’s. Here is some example code:
Here is the cool thing: we spent just three hours to add this feature to C. This includes syntax, type systems, quick fixes and the (relatively trivial) generator to C text. This clearly speaks to the power of MPS!
This week we also added enums to C, created a state machine language prototype, as well as a prototype for configurable counters. This is a lot of fun🙂