Re: Object Oriented Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 12 Dec 2004, at 10:59, Tone =8Akoda wrote:

>
>
> posted by: Tone =8Akoda <tskoda at email.si>
>
> Matt, this looks very good. I would use it, especially if preprocessor wi=
ll be
> available so that there is no speed loss. If only it would work more
> "intuitive", like example I gave below.
>
> I would also like to use classes as structures, ie only data no routines.=

> Because the meaning of OO or classes for me is in that it helps me organi=
ze my
> code more clear.
>
> I like name class more than euclass.
>
> About trace or debugger: in my opinion it should be part of editor, so th=
at you
> have all at one place. Debugger will have to display lines of code anyway=
, why
> not use an existing editor to do it?
>
> }}}
<eucode>
>=20
> include get.e
>=20
> euclass PERSON
>  integer age
>  sequence name
>  procedure show_stats ()
>   printf (1, "Persons name is %s and is %d years old.\n",
>    {name, age})
>  end procedure
> end euclass
>=20
> PERSON tone
> tone.age = 23
> tone.name = "Tone =8Akoda"
> tone.show_stats ()
>=20
> if wait_key () then end if
>=20
> </eucode>
{{{


Good stuff. Where i differ on everyone i know is in inheritance and
descendants. I wish to allow full overloading and multiple inheritances, li=
ke:

<not any code in particular>
class a = bird
  properties = { }
  methods ____
class b = mammal
  properties = { }
  methods ___

class platypus ==20
   inherit class a
   inherit class b -- last inherit has priority
   properties = { } -- overload as necessary
   methods ____ -- overload as necessary

</code>

Also, dynamic changes in methods and any data field while the program is=

running, with changes (or additions or deletions) propagated thru all
descendants instantly.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu