lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Op Do., 20 Sep. 2018 om 04:08 het Coda Highland <chighland@gmail.com> geskryf:
>

> The biggest problem with OO is, as I mentioned previously, opinionated
> frameworks. "When all you have is a hammer," as the saying goes: Java
> engineers in particular have a tendency to try to build frameworks
> that are generic enough to tackle anything without thinking about
> whether or not it's actually the best idea. (C++ engineers do the same
> thing but instead of making a zillion interfaces that require you to
> define dozens of tiny classes, they make a zillion templates.)
>
> This isn't the fault of the object-oriented paradigm, though, because
> you'll see the same failures in the functional programming community:
> a rigidly narrow focus on defining everything in terms of pure
> functions, higher-order functions, and function composition, inventing
> schemas and frameworks and patterns that they swear will make your
> code better if only you follow the rules. And if your application fits
> the kind of ideas where that structure makes sense, it does. And if
> your application doesn't quite fit that mold, you end up having to
> hack around it, making a mess where you might have been able to
> express the same thing in a few obvious lines of code.

Two days ago, I bought a second-hand copy of Reiser and Wirth's 1992
book "Programming in Oberon" at a library sale for half the price of a
can of beer, even though the PDF is free and I have it somewhere on my
computer too. It repaid the investment within minutes.

"Object-orientation as a programming technique, together with object-
oriented programming languages, is a fashionable topic. Oberon is true
to its spirit: a minimal language extension — namely extension of record
types — suffices. This is in contrast to other approaches that introduce a
wealth of new concepts many simply renaming established notions."

"The ultimate innovation was data type extensibility, which unfortunately
remained obscured behind the much less expressive term ‘object-oriented.’"

The book is exactly as old as Lua, which also has does it by only a
minimal language extension. Dare I guess that Lua's authors, too, were
and are not over-fond of OO buzzwords and hype?