9 karma · joined February 5, 2009
data Foo a = Blah a | Bar (Foo [a])
and you'll have no trouble making a function "showFoo :: Show a => Foo a -> String" using straightforward programming. If you try to do that in C++ you'll get infinite template recursion.Also, C++ templates don't restrict you to match the right type signatures, the way Haskell typeclasses do.
But other than that, they are pretty much the same kind of thing and are used in the same way.
There is no reason for that function to be defined as a method in Array.
I mean, it's really easy to imagine a "good student" branching out, taking an art class, and getting a C, but it's hard to imagine a "good student" branching out, trying macroeconomics, and struggling.
In C# 3, the verbosity level is much less than in C# 2, where it's slightly less than C# 1.
I don't see where Ruby syntax is particularly more concise than C# 3's.
Well, let me clarify "particularly". I don't find myself feeling like I'm suffering under C#'s syntax, relative to Haskell's. It has about the same amount of syntactic overhead: writing types for method parameters, and when defining data structures. Occasionally I have to explicitly write a type parameter to a function.
But it doesn't. There are plenty of people with CS or SE degrees that lack a minimal level of understanding. Even with a terribly lenient definition of minimal.
I'm talking about people who get through 4 years of a decent CS program and would vehemently insist that "array" is an exact synonym for "linked list".
I'd say that the benefit of a CS degree is weaker -- just that it brings forced exposure to important topics, so if you have two people who are smart, the one with a CS degree is going to be more well-rounded. The thing is, you usually don't get to decide between two smart people when hiring. And the CS degrees that are around don't seem to reduce the risk of bugmaking.