F
Frans Bouma [C# MVP]
Christoph said:Yep. AFAIK it's really only needed for inline construction of
anonymous types. The rest is mere convenience.
So in real life scenario's where in most cases teh GUI developers have
to call BL methods, it's not that useful... why even bother adding it..
See, the thing is that people like me think the var version is more
readable, not less so. You seem to think that code always gets more
readable as it gets longer. I think that the most readable code is
the shortest code that still conveys the intended meaning.
Readable code to me is code which is understandable from the text it's
written in, thus doesn't need help from tools to get understood. A type
which is constructed by the compiler under the hood doesn't end up in
the text, at least that's how I see it.
Well, that's just a ridiculous statement. C# started out as a Java
clone with some C features, and its design philosophy was always
similar to Python: if a feature is useful, adopt it! C# is not a
single-minded reseach language that must be kept "pure".
*sigh*. My point is that C# is an OO, single-inheritance, imperative
language. If you add constructs of other paradigms to it, you get a mix
of paradigms, which blur the intentional purpose of the language. I
mean: why even use types at all, if Ruby apparantly is so great?
You might as well say "if people want OOP they should use Smalltalk"
as an argument to keep OOP out of all existing procedural languages.
And you could have made the same complaint when generics were
introduced: "If people want generics they should use C++"!
No, because that doesn't have anything to do with mixing paradigms.
Functional programming is just as valid as the two other paradigms,
procedural and object-oriented programming. It's just another tool in
a toolbox. The fact that FP used to be limited to research languages
is a historical coincidence, not some holy law of design.
Again, I didn't say anything about the validity of a different
paradigm, I just think it's bad to mix paradigms in a language.
FB
--