3 ms·
"Its a good idea to know at least one multi-paradigm programming languages like Python, Java, C++ or C#" Those aren't really multiparadigm programming language
by spacemanaki 14y ago
"Its a good idea to know at least one multi-paradigm programming languages like Python, Java, C++ or C#"
Those aren't really multiparadigm programming languages.
- jsight 14y agoPython and C# are, IMO. Can you explain why you disagree?
- ntkachov 14y agoPython maybe. C# (at least when i used it, 3.0)is basically Java and is very object oriented.
- T-hawk 14y agoC# is fundamentally OO (especially considering the .NET framework that it's tightly bound to in real-world use), but can be used in functional ways. C# has first-class functions and closures. The LINQ stuff introduced in 3.5 is amazing to work with, giving C# many capabilities of a list-processing language also. I love C# and would definitely call it multiparadigm.
- h_r 14y agoC# has closures but why do you say it has first class functions? I'm pretty new to C# but I thought all functions still must be members of a class. Yes you can pass delegates to, or return them from, a function but they cannot stand alone. Isn't that true?
- beagle3 14y ago> but can be used in functional ways. Every language can be used in functional ways, including Fortran, Cobol and assembly language. I think the main question is "what is idiomatic in that language?" and in that case, C#, even with LINQ, is still not functional (in the sense that Erlang, Haskell, OCaml and Scheme surely are, and Python sometimes is). For example, when you use select in c# over a user-defined collection, the enumerator might modify global state. It would be bad practice, but it's not unheard of. I wouldn't say c# is functional.
- spacemanaki 14y agoWell, to be honest you're probably right, and I expected some backlash from this comment. I was thinking more in a cultural and idiomatic sense than technical one. If you were to sit down at most Python and C# projects, the code is going to be pretty object-oriented. Functional programming beyond map, filter and fold are going to be pretty clunky. I think I was also reacting to this suggestion in general. I don't think it's that important, and the term "multiparadigm" is vague enough that it almost sounds more like "learn a language used heavily in industry". I think it's probably more valuable to learn different languages that diverge drastically, and with object-oriented programming, languages that diverge radically (and sometimes opinionatedly) from the classical Java, C#, C++, Python model. Prototypes in JS, multiple dispatch in CLOS, OOP a la carte as in Clojure... these are all pretty different from classical OO, and have certainly broadened my understanding of OOP, perhaps not necessarily to the benefit of my Java code, but certainly to my understanding of its limitations.