lua-users home
lua-l archive

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


On Thu, 3 Oct 2013 12:11:34 -0400
Sean Conner <sean@conman.org> wrote:

> It was thus said that the Great Jay Glascoe once stated:

>   While I think OO is overused (personal preference), if you are

I agree with Jay on this, and wonder how many others do too.

Although in the late 1990's and early 00's I was all OO all the time,
some of the atrocious code I wrote in that period caused me to
re-evaluate OO, resulting in much less usage.

I love having an object to represent an actual entity. A person. A
cannonball. A retail transaction. A product. I get every single thing
about that entity, including how to deal with it (or how it acts, if
you want to think of it like that), wrapped up in one place.

But doesn't it seem like the Smalltalk-worshiping aficionados have
declared that *everything* should be OO, even things that are obviously
procedural in nature? When I see a program whose main routine is an
object, I start getting suspicious.

I think polymorphism is waaaayyyyy overrated. If I want to make a
Domain Specific Language, I don't need the language to help me by
redefining operators. I think that to a degree inheritance is a little
overrated too. Yeah, if implemented correctly, it's good, but a lot of
time its benefits get drowned in a sea of complications.

One thing I like about Lua is Lua makes it very easy to use pretty much
any programming methodology. Because I have more tools than a hammer, I
see non-nail target methodologies. I'm a big fan of callback routines.
Callback routines are painful in C, but in Lua, heck, you can stick one
in a table.

As a matter of fact, first class functions are a powerful tool that Lua
does better than most languages.

OO has its place, but doesn't it seem like, from 1992-2008, those "in
the know" tried to shoehorn every problem domain into an OO solution?

Thanks,

StevET

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance