News for hackers. Stuff that matters.
Re:Being a polyglot programmer by tesmar2 on Tuesday November 06, 2012 @08:38AM (#4748292)
> When I finished the course I really liked Haskell and functional programming because of its clarity, readability and the fact that I could write a very compact code. But I had no practical use for it. It did not change my Programming style but made me look for a more pure and “nicer” language to learn.

Why did it not change your OO style to be more functional? Static methods, no mutation, etc etc?

Re:Being a polyglot programmer by stonemetal on Tuesday November 06, 2012 @09:17AM (#4748445)
Why would it? OO languages aren't functional. Trying to misuse a tool seems like a great way to resent it. After learning to use a saw, trying to cut boards with a hammer would be a nightmare.
Re:Being a polyglot programmer by loup-vaillant on Tuesday November 06, 2012 @09:36AM (#4748523)
It depends on your OO language. If you have garbage collection, you can at the very least refrain yourself to use mutable state all over the place, especially at interface boundaries. It's not hard: http://loup-vaillant.fr/tutorials/avoid-assignment
Re:Being a polyglot programmer by nahname on Tuesday November 06, 2012 @10:05AM (#4748666)
I learned java in school and used C# professional for year. Almost every useful refactoring I perform in C# is based on functional concepts. You can slap patterns on a mess to provide order or you can introduce functional concepts to remove it, almost entirely.

I am not trying to dismiss patterns, but when you have lambda's you have a free way to add a visitor, command or specification to your code. It is one line instead of three interfaces and a bunch of shared understanding.

Consider,

var even = (new [1,2,3,4]).Select(x => x % 2 == 0);

The select statement gives you a way to interrogate individual objects, in the same way you could if you built up all the plumbing for a visitor pattern. What did I have to add to do this? Nothing. C# is awesome.

Re:Being a polyglot programmer by bbotond on Tuesday November 06, 2012 @11:59AM (#4749272)
Isn't it new[]{1,2,3,4}? Or is this some new syntax I don't know about?
Re:Being a polyglot programmer by nahname on Tuesday November 06, 2012 @12:32PM (#4749434)
No, you posted the correct form. Mine would have a compile error.