Live data from Hacker News

Learning Haskell/Python makes you a worse C# programmer

lukeplant.me.uk

51–60 of 64 posts

Re: Learning Haskell/Python makes you a worse C# programmer

#51
post #27
post #16

Earlier quoted context omitted.

Linq, which was inspired by ... Haskell! Would it be irresponsible to speculate that this article is directly responsible for the inclusion of Linq in C#? It would be irresponsible not to speculate!

LINQ was introduced by Erik Meijer, an Haskell researcher working on .NET team. http://research.microsoft.com/en-us/um/people/emeijer/papers...

a true gem, thanks for this. where did you find out about this paper?

Re: Learning Haskell/Python makes you a worse C# programmer

#52

Earlier quoted context omitted.

What event-handling semantics?

Responding to messages or choosing not to is event handling.

In a sense, but message passing is the basic concept of object-oriented programming. Choosing which messages to receive and respond to is defining an interface. If you don't want to do that, you just don't want an object-oriented list of strings. Maybe you just want a list of strings that lives in a struct with some function pointers and some syntactic sugar for calling those functions. And that's fine. But for those of us who do want an object-oriented list of strings, allowing that list of strings to respond to messages like "where" is perfectly acceptable, and certainly no worse than demanding that it only respond to messages like "filter".

If anything, it introduces unnecessary semantics to syntactically distinguish between messages that are responded to with instance variables and messages that are responded to with function calls.

Re: Learning Haskell/Python makes you a worse C# programmer

#53

> The fact is that functional idioms work badly in languages that don't have syntactic support for them. You can even remove functional from the sentence. Powerful features of languages like Python and Lisp don't get you more power than languages like Java. They give you more power per unit of effort.

The definition of power is energy per unit of time. Similarly, the common usage of the word power as applied to programming languages means pretty much that: you get more out of your work. In this analogy energy would correspond roughly to computability, which is not quite so useful a concept to measure. (Of course the analogy breaks down--energy can be indirectly measured, but computability is a yes-or-no question.) http://www.paulgraham.com/power.html

Re: Learning Haskell/Python makes you a worse C# programmer

#54

Wow, this is the worst article I've seen on hacker news front page in a very long time. C# has a tremendous potential for functional programming. There's some features that make a pure functional style easier and prettier in haskell, but C# has plenty of potential. The title is total link bait. I clicked because I know there are things to write about - like pervasive nulls and mutable-by-default variables to begin wi…

C# has improved greatly since this article was written, but replace it with Java and this piece is still sadly relevant today. The point is not that C# is bad, it's that using outdated tools can make it impossible or impractical to apply the kind of knowledge that many programmers today consider nigh-essential.

Re: Learning Haskell/Python makes you a worse C# programmer

#55

Earlier quoted context omitted.

Responding to messages or choosing not to is event handling.

In a sense, but message passing is the basic concept of object-oriented programming. Choosing which messages to receive and respond to is defining an interface. If you don't want to do that, you just don't want an object-oriented list of strings. Maybe you just want a list of strings that lives in a struct with some function pointers and some syntactic sugar for calling those functions. And that's fine. But for those…

[deleted]

Re: Learning Haskell/Python makes you a worse C# programmer

#56
post #55

Earlier quoted context omitted.

In a sense, but message passing is the basic concept of object-oriented programming. Choosing which messages to receive and respond to is defining an interface. If you don't want to do that, you just don't want an object-oriented list of strings. Maybe you just want a list of strings that lives in a struct with some function pointers and some syntactic sugar for calling those functions. And that's fine. But for those…

[deleted]

It's nice that you know more about the semantics of C# than the maintainers of the .NET framework.

Re: Learning Haskell/Python makes you a worse C# programmer

#58

Earlier quoted context omitted.

Using Select and Where makes perfect sense.

In SQL it does.

The whole point of LINQ is to add query-like functionalities to C#. LINQ stands for "Language-Integrated Query"

from http://msdn.microsoft.com/en-us/library/bb397926.aspx

"Language-Integrated Query (LINQ) is a set of features introduced in Visual Studio 2008 that extends powerful query capabilities to the language syntax of C# and Visual Basic. LINQ introduces standard, easily-learned patterns for querying and updating data, and the technology can be extended to support potentially any kind of data store. Visual Studio includes LINQ provider assemblies that enable the use of LINQ with .NET Framework collections, SQL Server databases, ADO.NET Datasets, and XML documents."

Post reply on HN