Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>C# has borrowed a lot of features from ML and Haskell for example:</p> <ul> <li><p>C# 2.0 brought us parametric polymorphism (or "generics"). I've heard that Dom Syme, one of the creators of F#, was largely responsible for implementing generics in the .NET BCL.</p></li> <li><p>C# 2.0 also allows programmers to pass and returns functions as values for higher-order functions, and has limited support for anonymous delegates.</p></li> <li><p>C# 3.0 and 3.5 improved support anonymous functions for true closures.</p></li> <li><p>LINQ can be considered C#'s own flavor of list comprehensions.</p></li> <li><p>Anonymous types look like an approximation of ML records</p></li> <li><p>Type-inference is a given.</p></li> <li><p>I don't know about you, but C# <a href="http://msdn.microsoft.com/en-us/library/bb383977.aspx" rel="noreferrer">extension methods</a> look an awful lot like Haskell <a href="http://en.wikipedia.org/wiki/Type_class" rel="noreferrer">type classes</a>.</p></li> <li><p>There's been a lot of talk about the "dynamic" keyword in C# 4.0. I'm not 100% sure of its implementation details, but I'm fairly sure its going to use <a href="http://en.wikipedia.org/wiki/Structural_type_system" rel="noreferrer">structural typing</a> rather than late binding to retain C#'s compile time safety. Structural typing is roughly equivalent to "duck typing for static languages", its a feature that Haskell and ML hackers have been enjoying for years.</p></li> </ul> <p>This isn't to say that C# is a functional programming language. Its still missing important features such as pattern matching, tail-call optimization, and list and tuple literals. Additionally, idiomatic C# is fundamentally imperative with a heavy dependence on mutable state.</p> <p>I wouldn't necessarily consider some of those features mentioned above as exclusive to functional programming languages, but its pretty clear that the C# developers have taken a lot of inspiration from functional programming languages in the past few years.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload