On 11/19/2011 11:27 PM, Walter Bright wrote:
I don't agree. You cannot have any data structures in Java that are not
OOP. You've really got to stretch to call Java multiparadigm.
You've got a very binary view on things.
Object-oriented programming is about encapsulating data via methods and
inheritance. If all you've got is primitive types, arrays, objects with
fields only, and static procedures along with reference equality then
you've got a classic, procedural program. The only thing you've paid for
is a tiny bit of object memory overhead.
Haskell, Ruby, Python don't, for example.
Haskell is *the* single-paradigm functional language, and I've already
stated it is. Both Python and Ruby offer functional support, as well as
support for objects.
I'll argue in this n.g. that Scala isn't functional, but I don't intend
to do so on the web site or write any articles about Scala.
In your binary thinking world, Scala doesn't support functional
programming. Yet the outside world sees that it does, so any marketing
along the lines of D being "multi-paradigm" isn't going to be unique.
It's misused a lot, to be sure. But we are using it correctly. D really
is multi-paradigm. There is no stretching of the term to make it fit.
It's a stupid sounding buzzword because average people don't use it in
everyday conversation. They use simpler, more common words like "model"
or "style". It's like when the marketing droids came up with the word
"leverage" and starting using it everywhere in place of "use".