1. OOP

If anybody has downloaded STOOP from the Euphoria Archive please post a
message with some feedback or email me at whoisan at hotmail.com
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » topic index » view message » categorize

2. Re: OOP

> If anybody has downloaded STOOP from the Euphoria Archive please post a
> message with some feedback or email me at whoisan at hotmail.com

I haven't, but the name is really cool =)

Greg

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

3. Re: OOP

"Quality" wrote:

> What Object Oriented capabilities are available for Euphoria?

Irv Mullins and I have experimented with OOP in our GUIs. WinMan is heavily
OO, supporting classes, single inheritance, local attributes and methods.

I also put together an unreleased OOP library; here's an example of the
syntax:

    -- create a class called "Point"
    Class( "Point" )
        Element( "int", "x" )
        Element( "int", "y" )

    -- create a point called "fred"
    New( "Point", "fred" )

    -- set the values
    Set( "fred", "x", 32 )
    Set( "fred", "y", 12 )

    -- retrive the values
    ? Get( "fred", "x" )
    ? Get( "fred", "x" )

    -- create a class called "Line"
    Class( "Line" )
        Element( "Point",   "point1" )
        Element( "Point",   "point2" )

    -- create a simple method
    procedure drawLine( sequence self )
        draw_line( WHITE, { Get( self, "point1", Get( self, "point2" ) } )
    end procedure

    -- assign it to the current class's "hello" method.
    AddMethod( "show", routine_id("drawLine") )

    -- create a line called "joe"
    New( "Line", "joe" )

    -- use SetGroup to assign multiple values
    SetGroup( "joe", "line1", {0,0} )
    SetGroup( "joe", "line2", {10,10} )

    -- call a method
    CallMethod( "fred", "show", {} )

If you want, I can send you a copy of the library. I didn't pursue it too
far, because the cost of looking up the attributes and methods is fairly
high - especially as you add more and more classes.

-- David Cuny

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

4. Re: OOP

At 09:54 a.m. 14-12-98 -0800, you wrote:
>> What Object Oriented capabilities are available for Euphoria?
>
>Irv Mullins and I have experimented with OOP in our GUIs. WinMan is heavily
>OO, supporting classes, single inheritance, local attributes and methods.
>
>I also put together an unreleased OOP library; here's an example of the
>syntax:

I believe we had an OOP thread about March of this year, or not?
Rather than having a OO library I think it's better to *code*
"ObjectOrientally". First you code each class on it's own module
(include file). It's easy to create public and private methods and
data members this way. Unfortunatly Euphoria's namespace management ain't
to brilliant and oblies to create complicated solutions. I'm hoping
RDS implements some way to programatically "tweak" namespaces... that
way you could reference class/objects methods like: PointClass.New(), where
'PointClass.e' is the module that implements the class.


Regards,
        Daniel Berstein
         daber at pair.com

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

5. Re: OOP

>I believe we had an OOP thread about March of this year, or not?
>Rather than having a OO library I think it's better to *code*
>"ObjectOrientally". First you code each class on it's own module
>(include file). It's easy to create public and private methods and
>data members this way. Unfortunatly Euphoria's namespace management ain't
>to brilliant and oblies to create complicated solutions. I'm hoping
>RDS implements some way to programatically "tweak" namespaces... that
>way you could reference class/objects methods like: PointClass.New(), where
>'PointClass.e' is the module that implements the class.


Well, actually there are some issues.
For example: safety, how do we implement types ?
How can we base one class upon anohter ? eh ? You really need a library, or
a lot of code for that.

But then speed ?
And readability ?

You need a library that handles a couple of things for you, however im not
in favor for "name" kind of quotiation, just store a handle in an constant,
the interpreter can sort those things out much faster than any find
("my_class", class_list) could ever do..

Ralf

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

6. OOP

------=_NextPart_000_0037_01BEF3DF.B32ED500
        boundary="----=_NextPart_001_0038_01BEF3DF.B32ED500"


------=_NextPart_001_0038_01BEF3DF.B32ED500
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I've finally finished the code and documentation for Eclasses v 2.0 -- a =
JAVA-style OOP system for Euphoria.  Anybody out there still interested =
in OOP?  Take a look and let me know what you think!
=20
--Mike Nelson

------=_NextPart_001_0038_01BEF3DF.B32ED500
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 =
HTML//EN">
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>I've finally finished the code and =
documentation=20
for Eclasses v 2.0 -- a JAVA-style OOP system for Euphoria.&nbsp; =
Anybody out=20
there still interested in OOP?&nbsp; Take a look and let me know what =
you=20
think!</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>--Mike =

------=_NextPart_001_0038_01BEF3DF.B32ED500--

------=_NextPart_000_0037_01BEF3DF.B32ED500
        name="Eclasses.zip"

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

Search



Quick Links

User menu

Not signed in.

Misc Menu