Friday, March 09, 2007

A Small Matter

I'm a big fan of object oriented programming a la Smalltalk. Nothing could be more different from BASIC than Smalltalk.

How do I resolve my love for BASIC and Smalltalk? It's easy. I pick the right tool for the job.

For large projects Smalltalk rules. Anything that has to scale to support many specialized features scales better when constructed from objects (usually anyways).

BASIC's strengths become evident when you know that your project will always be small. In such cases I can knock out a quick solution to my problems faster in BASIC than I ever could in Smalltalk, or Java for that matter.

In addition in order to be productive in most modern systems like Smalltalk, Java, etc. I need to learn to use a large class library. In BASIC I can dispense with all that.

BASIC is fun.

3 comments:

Unknown said...

I think this is one of the appeals of the "dynamic" languages today - Python, Perl, Ruby. They make it easy to do simple everyday tasks, but, because if their OOP orientation, large projects can still be tackled. I would envision something similar possible for LB 5.0. Keep the everyday small tasks simple, but provide the ability to create frameworks for applications that can simplify larger apps.

Noble Bell said...

That is a very interesting way to put things Carl. I have been trying to justify OOP and BASIC for along time and you just did it for me. Thanks!

You are correct. BASIC will get me to a small project's solution faster than C# has ever got me.

But for the larger stuff that I know is going to be big and scaleable then I have to use C# because of it's OO nature.

@Tom, I have looked at Ruby and it's pretty neat. I like that everything is an object (Smalltalk roots).

Carl Gundel said...

"The problem I have is that in any BASIC language you will either have 1) a complex set of functions as bad as any object library in Java, etc. or 2) greatly reduced functionality."

Isaac, I think we can agree that neither of these pose a problem if you are using BASIC for small projects, or quick and dirty tools. BASIC is often very adequate for such things.

This is really the heart of what I meant in my post.

As for the rest of what you wrote, yes there is a balance to be struck. In fact we will add some simple object ideas to our BASIC, and the hard part will be knowing just where to draw the line along the spectrum of absolute minimalism and full blown OO language. For BASIC, I tend to favor minimalism. If you really want OO, use a first class OO language. If you really want BASIC, use BASIC. I'm not convinced it's possible to provide BASIC and real OO in one language.