programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: object idea

From: Charles Melice <mail_at_forthcad.com>
Date: Sat, 24 Apr 1999 10:53:41 +0100

Gene,

You talk about the "constructor" and "~destructor" methods as in C++
class-system.

Forth language is already esoteric.

I prefer to maintain my class-system as simple as possible. With C++, a lot
of problems comes from the complexity of the class design.

I think the C++ class system is more a theorical concept then a real tool
to develop programs: the initial work is: "how to develop a good
application". With C++ it become: "how to develop intellectual classes".

We can implement: constructor, destructor, multiple-inheritance,
class-template, protected/private inheritance, dynamic binding...

The system will become so complex that we cannot know where and what
finally do the system !

Look at my Windows classes, I never need complex idea. The result work
without constructor nor destructor. If I had the contructor concept, my
first approach would be to think about the problem of using it !

Charles

----------
> De : SF Talk <sftalk_at_forth.com>
> A : SF Talk <sftalk_at_forth.com>
> Objet : Re: object idea
> Date : vendredi 23 avril 1999 23:50
>
> Date: Fri, 23 Apr 1999 17:29:07 +6
> From: "Gene LeFave" <gene_at_tekdata.com>
> Subject: Re: object idea
>
> Charles,
>
> When OOF creates an object it automatically executes a method named
> INIT. I'm thinking of making this the default first virtual in all
> classes.
>
> As far as << >> goes I was just trying to save key strokes. I find
> that a lot of time I call a lot of methods for the same object.
> (outside the class definitions). I also often want to call the
> ssame method for a series of objects, but I can't think of a good way
> to implement that at all.
>
> Gene
> > >
> > > I was tinkering with my oof last night and have a couple of ideas I'd
> > > like to share.
> > >
> > > Would it make since to have an object instance just be a pointer to
> > > the actual object, which is not actually created until it is needed.
> >
> > When you create an object you give it initialization values. Where
would
> > the initialization values come from.
> >
> > >
> > > This JAVA like approach would allow static and dyanamic objects to be
> > > treated essentially the same. The variables could also be linked
> > > together allowing a prune funtion to delete them.
> > >
> > > Secondly, I was trying to think up a syntax that allows more then one
> > > method to be compiled for the same object. Something like:
> >
> > Why would you want to add methods through an object, methods are a
class
> > thing?
> >
> > >
> > > myObj << Get 1+ Put >>
> > > Get and Put are methods for myObj.
> > > Where << puts the class into the context and allows normal compiling
> > > to continue, then >> restores it. I'm
> > > not real happy with using << and >> though, any suggestions?
> > >
> > > Gene
> > >

.
Received on Sat Apr 24 1999 - 10:53:41 PDT

This archive was generated by hypermail 2.2.0 : Thu Nov 20 2008 - 03:04:26 PST