3 ms·
Agreed. Same with "OOP". Who the hell knows what people really mean when they say that. Those people who think that "FP" means "type system like Haskell" are w
by ragnese 6y ago
Agreed. Same with "OOP". Who the hell knows what people really mean when they say that.
Those people who think that "FP" means "type system like Haskell" are wrong, though, IMO. It precludes languages that are much more function-based, such as Clojure, Schemes, Elixir.
- wtetzner 6y agoFunctional in my mind more or less means means working with immutable values.
- scns 6y agoUsually when the term OOP is used, it actually means ClassOrientedProgramming (C++/Java/C# etc)
- ragnese 6y agoWhich I also don't understand. Is that a style of overusing classes where functions would suffice (FooHelper)? Or is it something about the language? Because almost all popular languages have classes. Rust and Go call them "struct", but it's the same thing. Swift has "class" and "struct", but they're both the same thing as a C++ class.
- iopq 6y agoRust structs are not classes. Rust puts structs inline (on the stack), classes are virtual. Since Rust is a systems programming language, it's an actual distinction that makes a difference
- ragnese 6y agoI'm not sure I follow. Both C++ and Rust allow us to put structs/classes on the stack or the heap. Rust has trait objects which use a vtables. Are Rust traits the same as "classes" then? When people say "OOP" or "class-oriented-programming" are you saying that they're referring to implementation details such as memory allocation?
- int_19h 6y agoI'm not sure what you mean by "classes are virtual", but if it's virtual dispatch, then that's completely orthogonal to allocating objects on the stack vs the heap.