I'm at #hopl and here is a potted history of the addition of what I call "computational modalities" to C# and F# - these include addition of new syntactic forms like comprehensions, or "modal" reinterpretation of existing syntactic forms.
First, in 2000-02, Todd Proebsting of MSR initiated an effort to convince the C# design team to add iterator methods, based on his experience with the Icon language, of SNOBOL fame. Iterator methods serve as a form of computed collection.
In 2005-07, those of us in F# looked at iterator methods and past history of tasksm promises, monadic and comprehension syntax to form F# async, F# sequences, F# list comprehensions and the general F# computation expressions.
During this same period, Erik Meijer, Anders Hejlsberg et al. were putting the LINQ query syntax into C#, covering an alternative comprehension syntax for IEnumerable and meta-programmed IQueryable and more, influenced by COmega protoype and functional programming
Around 2011, the F# 2.0 notion of an async modality flowed into C# 5.0, integrated with state machine compilation from Axum, TPL tasks and other influences. Likewise, F# extended computation expressions to include queries and prototyped async sequences
More recently, things have not stood still: Async has flowed out into TypeScript, Python, C++, Kotlin and other languages, C# has added async iterator methods, and F# 5.0 extended computation expressions to include the ability to express applicatives, influenced by Haskell.
I may have some details wrong, and there were many other influences and people involved. It's hard to write a comprehensive and fully accurate history, this is my recollection.
Given the sucess of this kind of work in increasing expressivity and productivity when working with compositional computations in production languages - and its partial influence on other languages - it feels worth looking at as a historical slice through recent language design
A full history would include all comprehension and monadic notations, early coroutine additions to C++ and Ada and so on, the history of Icon iterators and SNOBOL and much more. Likely future languages will modify and extend these stories, e.g. using effect handlers etc.
An anecdote: Todd Proebsting sent me a message saying roughly "I hear you're adding generics to C#. I don't give a damn about generics but can you teach us how to hack the compiler?" (then in C++), then visited in Cambridge. We had a great summer together, I think 2000 or 2001.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
This includes links to some key frameworks plus a link to the F# Software Foundation guide to F# web development for more comprehensive community listings
A farewell to Simon Peyton Jones as he leaves Microsoft Research
Subject: RE: New horizon
I would like to add a few words to what Chris has written. I know I am also speaking for Mads, the current lead designer of C# (cc’d)
From 1997 to 2015, Simon PJ was pivotal in the Programming Principles and Tools group at MSR Cambridge. The work of that group included major contributions to the research and practice of programming, a stream of seminal publications,..
... and succeeded in changing the conceptual foundation of programming for millions of programmers through direct contributions to Haskell, C# and F# - and transitively through profound influence on other languages.
One simple way to help F# is to help us fill in basic F# code samples for all the F# core library functions. These should have been done long ago, but let's do them now!
@chaldal.com is a global company centred in Dhaka, Bangladesh. You can read more about them on their website.
I've long believed F# could have a strong role in up-tooling the software skills of developing nations, giving them a competitive advantage.
But for me, this one is also very personal.
In 1993 I had the opportunity to travel to Bangladesh, to visit my brother, who was working doing flood modelling on the internationally sponsored Flood Action Program.
"All our new code is in F#, we started off from a C# codebase, so that made the transition somewhat manageable, as new F# code can be directly called from C#, and vice versa (still took over 2 years)..."
".... All new frontend apps are also being written in F# (using Fable), as of 6 months back, migrating away from TypeScript, this forces everyone into a "design your model first, and well" paradigm...."
It's really strange what nonsense people put up with in C#.
This business where expression results are implicitly discarded from statements is just insane in the 21st century. So much information loss just waiting to happen without even a warning.
Other gaping holes in the C# design I've noticed this last week:
- no way to implement interfaces or abstract classes using an expression, meaning stupid extra classes
- no implicit construction for classes (to give another form of closure capture for object imlpementations)
- no expression form for generative list or sequence expressions (making HTML DSLs a mess among other things)