3 ms·
Counterpoint: it's become a fairly multi-paradigm language at this point, and a multi-paradigm language is exactly what should be the defacto language in curric
by brundolf 5y ago
Counterpoint: it's become a fairly multi-paradigm language at this point, and a multi-paradigm language is exactly what should be the defacto language in curriculums
Whether or not Java is the best one for this purpose is up for debate, but I think it's no longer a bad one
- weatherlight 5y agoIs it though? just because it has lambdas, does that make it functional?
- kaba0 5y agoYes. Like there is no one definition of most paradigm’s, but what used to be the most FP language, LISPS definitely don’t conform to the more strict FP-definitions like pureness, strong type system, etc. What remains is simply having functions as first class citizens and you can very much save functions into maps or whatever in Java.
- weatherlight 5y ago...and therein lies the problem. having some sort of syntax for lambdas does not a function programming language make. There's nothing about the Java syntax or design that lends its self to FP. Lambdas were bolted on to the language after the fact.. That's like saying Scheme is Object oriented because its trivial to make objects from closures, and should one decide to go deeper, you could easily define macros for classes, methods, etc. It's grossly disingenous to call Java functional, or even compare it to other functional programming languages.
- Athas 5y ago> Counterpoint: it's become a fairly multi-paradigm language at this point, and a multi-paradigm language is exactly what should be the defacto language in curriculums I'm surprised you would say this, as it is the exact opposite of my experience as university teacher. I think we should teach concepts, and concepts appear much more crisply in small and focused languages. I think students gain more from being exposed to specialised languages than to more muddled multi-paradigm languages. For example, functional programming is much clearer in a language such as SML or Haskell than in Scala or F# (although the latter isn't that bad), because you can actually teach the whole language without any part of it muddling the concepts. Similarly, I would rather teach object-oriented design and implementation with, say, Smalltalk than OCaml. Now, industrial usage is a different matter - here I have no problem with multi-paradigm languages.
- brundolf 5y agoAn assortment of specialized languages in different paradigms would probably be better than a single multi-paradigm language. But I was assuming the "CS 101" case, where you're just trying to get a feel for code and probably don't want to be overwhelmed with learning several different languages at once. In this context I think laying a foundation with a single versatile language makes the most sense - a "sample platter", if you will - and then later courses could dive deeper into different paradigms using more specialized languages (where those paradigms would already be familiar because of that base language, but they'd get brought into more clarity). Another advantage of laying this kind of foundation is that even if the initial course stuck to a limited set of features, students could then go out and use the things they've learned and explore other features adjacent to them at their leisure, without going too far outside of that initial comfort zone (and - maybe most importantly - using the same tooling/environment setup, which can be the biggest barrier to new programmers who want to try out different technologies) I'll admit though that this is mostly speculation on my part
- Athas 5y agoI suppose it depends on how long that CS 101 course would be. At our department, we used to have an initial half-semester course that taught computational problem solving and programming using Standard ML. It was necessarily based on functional programming, although Standard ML is impure enough that we could also do simple IO. In the next course, they were taught object-oriented design and programming in Java. This has been replaced with a single course that uses F# (a multi-paradigm language) to teach a mixture of functional, imperative, and object-oriented techniques. It is not my impression that the students are left with a very clear conception of these ideas afterwards. Mostly they just seem to loathe F# - more than prior generations loathed Standard ML, even though F# is far more practical and has far better tools. There can be many reasons for this, but I think people completely new to programming do not have the maturity to juggle multiple paradigms within such a short period of time, and within the same language. Perhaps switching to a materially different language when switching concepts actually helps them, so they don't mix up things too much.
- 5y ago
- dunefox 5y ago> it's become a fairly multi-paradigm language at this point It's still very much an OO language with borrowed features. > a multi-paradigm language is exactly what should be the defacto language in curriculums Debatable. Multi-paradigm languages without a strong focus can overwhelm someone completely new.