Re:Learning Haskell/Python makes you a worse C# programmer
by njbooher on Sunday November 25, 2012 @08:37PM
(#4829991)
I'd rather not introduce event-handling semantics to a list of strings. It's easier to add a 'filter' method. Granted, a distributed task queue might benefit from this, but I'd still rather not have it baked into everything.
[ Parent
| on HN ]
Re:Learning Haskell/Python makes you a worse C# programmer
by philwelch on Sunday November 25, 2012 @08:40PM
(#4829998)
What event-handling semantics?
Re:Learning Haskell/Python makes you a worse C# programmer
by njbooher on Sunday November 25, 2012 @08:43PM
(#4830017)
Responding to messages or choosing not to is event handling.
Re:Learning Haskell/Python makes you a worse C# programmer
by philwelch on Sunday November 25, 2012 @08:57PM
(#4830045)
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.
[deleted]