Are there any connections between Haskell and LINQ?

前端 未结 4 1554
北海茫月
北海茫月 2020-12-24 03:01

I wrote some queries in C# using LINQ. After a while, I started using Haskell a little bit, which is a functional programming language (a not so popular one), and for me it

4条回答
  •  情书的邮戳
    2020-12-24 03:53

    Also could LINQ be considered functional programming?

    LINQ implies a functional style in that it resembles, for instance, a SQL select, which is read-only in principle. However, because the LINQ clauses in .NET are implemented by plain-old CLR routines, there is nothing to prevent LINQ expressions from modifying state.

    Haskell, on the other hand, is a "pure" functional language, so expressions cannot modify global state. Although it is possible to perform IO and graphics operations, these are carried out using a very different idiom from anything in .NET — including F#, which lets you drop into a procedural style more or less transparently.

提交回复
热议问题