Nemerle is notable Environment Managed compiler written in Nemerle Visual Studio 2008 plugin with debugger and autocomplete Free IDE based on Visual Studio Isolated Shell Sharpdevelop plugin Mono support NAnt plugin
Nemerle is notableWhy not try? Nemerle is almost a superset of C#, so if you know C# you can use Nemerle.
Nemerle is notableWhy not try? By the way, Nemerles compiler can compile C# code, so you can try it on exising C# project
Nemerle is notableMonads Monad is creational functional programming design pattern that deals with computation creation. The upcoming C# 5 async/await feature is particular case of a monad (creation of asynchronous computation). Computation expressions are monads + monoids. Nemerle supports computation expressions.
Nemerle is notableMonads Consequently Nemerle supports the upcoming C# 5 async/await feature right now among the other monads.
Nemerle is notableExample of easy composition of two async methods
Nemerle is notableAlgebraic data types Short intro to algebraic data types
Nemerle is notableAlgebraic data types Lets learn ADT by example Suppose we need to work with expressions like a + sin(b)
Nemerle is notableAlgebraic data type Of couse we need trees
Nemerle is notableOOP approach to trees (class hierarchy)
Nemerle is notableFP approach to trees (ADT - algebraic data type)
Nemerle is notableAlgebraic data type semantic After we rewrite OOP code with variant (ADT) we should consider `Sum as a constructor of type `Tree `l,`r as its params (not a Tree.Sums elds) But if they are params, how get them back from a `Tree typed object?
Nemerle is notableAlgebraic data type Disassembling (pattern matching) Pattern matching solves this problem. It checks if object is constructed with constructor specied in a pattern and if it is true it binds actual parameters of constructor with names of variables the pattern. Lets see on the following example.
Nemerle is notablePretty Printing of `Tree typed object
Nemerle is notableAlgebraic data type OOP vs. FP OOP 72 SLoC (pretty printing with visitor pattern) FP 25 SLoC (pretty printing with pattern matching)
Nemerle is notableVariant is OOP enabled algebraic data type
Nemerle is notablePattern matching goes beyond disassembling Pattern matching can be nested.
Nemerle is notableAlmost all features are macros Nemerle seems to be complex, but. . .
Nemerle is notableAlmost all Nemerle features are macros Dont worry Nemerle is a simple language and almost all features are macros parts of standard library, not a language. Macros is a plugin to compiler. You can write your own macros to introduce new language constructs or eDSL.
Nemerle is notableAlmost all Nemerle features are macros Youve already meet macros in this presentation, they are. . .
Nemerle is notableAlmost all Nemerle features are macros LINQ Object initialization Anonymous types Late (dynamic) XML-Literals INotifyPropertyChanged macro Safe navigation Design by contract Computation expressions Lazy macro and even if while foreach
Nemerle is notableAdvanced macros Beside macros copying useful features from another languages there are macros adding unique features. One of them is Nemerle.Peg. It is a macro-library that allows to describe grammar in the attribute and during the compilation necessary methods for parsing text in this grammar will be added to the class. Also there are some macros supporting design patterns.
Nemerle is notableNemerle is cool Nemerle is cool. It was proved.
Nemerle is notableMetric Some metric of using Nemerle in home pet long-term research project uniquation.com formula search engine
Nemerle is notableMetric Two years ago rst prototype was rewritten from C# to Nemerle in 3 days. Nemerle experience before 0. Code was reduced by 46%. Last month a new macro library (Nemerle.Peg) was applyed. Code was reduced by 15%.
Nemerle is notableAdditional materials Nemerle on google code Nemerle site Sources code of examples shown in this presentation