1. Real OOP in Euphoria

Real Object Oriented Programming in Euphoria
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        I saw the OOP program available at the Euphoria site, but the author
doesn't really understands the use of OOP, does he???
        OOP is about little pieces of code which hold their own variables
and which you can give commands or ask about something.
        The underlining code is not important and can be changed at will.

        OOP is NOT about sequence elements which are named instead of
numbered. This effect could easily be done by constants...

        If you want real OOP, you should write a pre-processor which
replaces all the code and makes normal functions out of them.
        However euphoria is more OOP as you might think since variables can
be at will be used as public (global atom kip) or as private (atom
kip). The same way you can have routines public or private (global or
not!) (This applies within the .E file)
        You just can't have instances of a class (an object) But this can
easily be done by a pre-processor, and sequencing all the var's in
one sequence, containg the vars for all instances.

        If nobody's wants to write but does really want this kind of
preprocessor, ask me and i'll code... (ask me nicely!!)
        But i guess it isn't really needed in Euphoria, cause like the
refman.doc said it achieves the same benefits in a much simpeler way.

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

new topic     » topic index » view message » categorize

2. Re: Real OOP in Euphoria

Ralf Nieuwenhuijsen wrote:

> Real Object Oriented Programming in Euphoria
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  [some snippage]

>         If you want real OOP, you should write a pre-processor which
> replaces all the code and makes normal functions out of them.
>         However euphoria is more OOP as you might think since variables can
> be at will be used as public (global atom kip) or as private (atom
> kip). The same way you can have routines public or private (global or
> not!) (This applies within the .E file)
>         You just can't have instances of a class (an object) But this can
> easily be done by a pre-processor, and sequencing all the var's in
> one sequence, containg the vars for all instances.

  Each class having access, RAPID access to it's own methods is the key.
  If an object could save the name/label of a function as a variable and
  then call that function directly, then Euphoria would be the language
  for me... once it was ported to Linux.

>         If nobody's wants to write but does really want this kind of
> preprocessor, ask me and i'll code... (ask me nicely!!)

  im asking  :/

>         But i guess it isn't really needed in Euphoria, cause like the
> refman.doc said it achieves the same benefits in a much simpeler way.

  it ain't the same thing.

> Ralf Nieuwenhuijsen
> nieuwen at xs4all.nl

-banjo
banjo at mindless.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu