Function References and Higher Order Functions

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 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s