InfoQ

News

The Roots of C# 3.0: F# and C-Omega

Posted by Jonathan Allen on Jan 11, 2007

Community
.NET
Topics
Research
Tags
F# ,
,
C# ,
LINQ ,
Functional Programming

Tomas Petricek talks about C# 3.0 and the languages that led to many of its new features. The two languages that most inspired C# 3.0, F# and C-omega, are discussed in detail along with how the features changed as they moved from the research languages to C#.

F# is an impure functional language based OCaml of the ML language family. Tomas writes:

Functional programming in general were big inspiration for some of the C# 3 features and the F# research language already showed how these features can be implemented for the .NET platform. C# 3 includes constructs that were inspired by type inference (ability to deduce the type of expression), tuples (data types that represent pair of values), first class functions (ability to take function as a parameter and return it as a result), lazy evaluation (ability to evaluate expression only when it is later needed) and meta-programming (ability to manipulate with program source code).

C-Omega provides the other half of the LINQ functionality.

C-Omega is a language based on C# and it extends it in two most important areas. First area is better support for working with structured data (XML) and relational data (databases). The language extends type system of C# to include support for several data types that are common in relational and structured data and it provides querying capabilities for working with these data structures.

Topics covered by Tomas include First Class Functions, Type Inference, Lazy Evaluation, and Anonymous Types. Also covered is Meta-programming.

Support for meta-programming (however only very limited form) is one of the key features that enables the LINQ project and especially its implementation for working with databases called “LINQ to SQL” (previously DLINQ). When writing LINQ code that will be used for accessing to database, the expressions used for filtering and projection (as well as for other operators like joins) must be translated to SQL command and this couldn’t be done without the possibility to get the data representation of those expressions (therefore without some form of meta-programming).

No comments

Watch Thread Reply

Educational Content

The Power of Visibility: Driving a Lean-Agile Transition

Kelley Horton discusses the reasons why her organization transitioned to Lean-Agile, the approach used and the visual tools helping them minimize WIP, concluding that visibility leads to success.

Panel: Modular Java

Alex Blewitt, Kevin Seal and Alex Buckley answer Java modularity-related questions: when is modularity needed, how to address it, and what are the improvements in OSGi-based development.

Whither the Smartphone? Future Directions in Smartphones and Mobile Development

Adam Blum discusses the current trends in mobile development and smartphones, trying to predict what will happen in this area over the next 5 years so a developer would know what to expect.

Cogs in the Machine: Testing Code Embedded in an Impenetrable Framework

Roy Osherove discusses the difficulties met when trying to test code embedded in a framework (cog), presenting several solutions to create unit tests for cogs, using Silverlight code as example.

Confessions of A New Agile Developer

This short article is a first-person case history of someone taking up Agility for the first time. It covers the problems and reactions that are common to most teams and most developers.

Scott Chacon on Git and GitHub

Scott Chacon talks about the technologies that power GitHub (Erlang, Redis,...), and the benefits of Git as a version control and as a storage system. Also: ShowOff, a JS-based presentation tool.

Reformulating the Product Delivery Process

Israel Gat, Erik Huddleston and Stephen Chin present how Inovis realized a higher product throughput by using three unconventional Kanban practices and a Lean Release Management tool called APROPOS.

Enterprise Mashups: Why Do I Care?

Ross Mason discusses how to use enterprise mashups by applying a number of patterns, such as FeedFactory, Super Search, and Pipeline, in order to find new ways to benefit from existing enterprise data