realbasic-nug
[Top] [All Lists]

Classes vs Modules

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Classes vs Modules
From: Dave Crist <davecrist at mac dot com>
Date: Fri, 31 Mar 2006 15:47:17 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <fed2e2560603310941h14b58b20x2b1171acae247f69 at mail dot gmail dot com> <C052D582 dot 2398B%fitzbew at nc dot rr dot com> <fed2e2560603311010o128441e1uf9b85ec74129401e at mail dot gmail dot com> <93957E4A-4ED0-42ED-BCAB-05E1EA317526 at stny dot rr dot com>
I have been working this semester translating some useful numerical code from Java to RB... mainly because I thought it would make me more aware of how I work and what I can do to make it better... plus it will wind up giving me another language to do AI work in... that said:

From Java, I am used to thinking about external libraries of code as classes. The idea is neat, straightforward, and I like it. However, since I have been using RB (mainly as a project/gui tool) I have always thought that a module WAS an external class of sorts. Further reading about modules, though, seems to indicate that the real goal of a module is just a central location for a collection of methods and properties and is not instantiable. But wait: that's just a finalized class that inherits from Object, right?

Besides subclassing, is that the real difference. Is a module just a class that doesn't inherit from anything and can't be instantiated or subclasses? When would it be better to use a module than a class, then? Are there performance issues? Anything else to be aware of?

Just throwing it out there. Thanks in advance,

dave
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>