This email is a reaction to this paragraph:

> Object Oriented Programming (OOP) is an elegant system
> of declaring data structures (classes) ..

I view that as misleading to:

* Yourself (if you think it's true as written, rather than a dubious
lie-to-children);

* Other readers (who might think you think it's true as written,
and then incorrectly conclude Raku must embody that view of
OOP and therefore Raku must be of no interest to them).

My 3 main points are, in summary:

#1 OOP does not need classes.

#2 Raku's OOP does not need classes.

#3 Raku's OOP doesn't unduly rely on classes.

I elaborate on each of those three points later.

----

As a 4th minor point:

#4 Raku's notion of OOP includes OO style function calls.

I won't elaborate on this minor point in this email.

----

#1 OOP does not need classes.

JavaScript has always been considered to be an OOP language.

JS did not have language level support for its first 20 years.

OOP does not need classes.

#2 Raku's OOP does not need classes.

Raku's OOP was designed  to support proto-type programming
and method delegation straight out-of-the-box. This is the style
of OOP that was JavaScript's only built-in style for 20 years.

Raku's OOP also supports mixins and roles, another pair of
critically important alternatives (and/or complements) to classes.

#3 Raku's OOP doesn't unduly rely on classes

Undue reliance on inheritances (the primary mechanism used
by classes to organize methods) was recognized in the 1980s
to be a major problem when overused.

Raku's OOP was designed to enable developers to avoid over
use of classes / inheritance.

----

In conclusion, I think it behooves Rakoons to be aware of:

* Composition over inheritance

* Prototype oriented programming and delegation

* Problems with (overuse of) inheritance / classes

* How Raku's OOP nicely addresses all of the above

--
love, raiph.

Reply via email to