6 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 cur
by 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.
- brundolf 5y agoInteresting. I guess my thinking was that "paradigms" are mostly artifacts of a) history, and b) ways of describing ideas which at production scale may lend themselves better or worse to a given problem space (in terms of maintainability, etc), both of which are good to learn eventually, but neither of which matter that much when you're just trying to figure out what code is. But I guess when you're just trying to figure out what code is, it helps to be able to form very consistent and concrete understanding around basic atoms like "what is a variable?". So if a language has different syntaxes that look similar but don't follow the same rules, that could get bewildering fast. Especially in languages that have sprawled over time and have competing ways of doing the same things. Maybe the best answer is a language that was designed holistically to be cross-paradigm from the outset? In contrast with a kitchen-sink language that's gathered features over the years Edit: Another thought; there may be a distinction to be made between "mixed-paradigm" and "cross-paradigm", where one takes the best pieces from multiple paradigms and works them together into a complete whole, while the other just dumps multiple entire paradigms into the same language. Rust for example does a great job of mixing-and-matching without sprawling (not that it would necessarily be a good first language, but for the sake of example)
- igouy 5y ago> … a language that was designed holistically to be cross-paradigm from the outset? http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/index.html http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/index.html https://www.info.ucl.ac.be/~pvr/book.html https://www.info.ucl.ac.be/~pvr/book.html
- kjeetgill 5y agoI've never taught, so naturally I'd defer to you on such matters but I feel completely the opposite. I suppose it depends on what year students you're teaching too but for me, elements of functional programming first clicked for me in Python precisely because I could compare how to solve the same problems in the same language so differently. I didn't get as lost in the incidental differences between languages like how do I print or import function, etc. but just how I might implement just one part of my program more functionally, how it'd help me reason better about that chunk. I suppose it shows that I rep Java and Python all day, the champions of compromise, jack-of-all-trades languages.
- kaba0 5y agoI agree with you - so teach both Java (for OOP) and Haskell (for FP). But I do find Java a perfect candidate for teaching about “traditional” development, where students get the benefit of static typing with easy to digest error messages (not that much runtime failure in specific circumstances that is really hard to debug as a beginner), well-defined behavior all-around (okay, not with regards to concurrency but that’s another topic — but not having your program segfault is very useful), understanding lower level memory details is in my opinion easier tacked on knowledge of a higher level language, so GC is a great start, and all around an easy/small language where the language primitives can be built upon in basically every other language.
- igouy 5y ago> … concepts appear much more crisply in small and focused languages. How about a multi-paradigm language that isn't muddled? http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/index.html http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/index.html