Re: Euphoria being OO Survey.

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

Jordah wrote:

<snip>

> I was recently looking at the java implementation of Swing and i thought
> that was great. I mean,....if you create a basic class eg JPanel...you
could
> easily extend it my overiding the default methods for painting..etc then
get
> an Edit Control.
>
> Pple had better try coding GUI libraries then they'll understand why its
> needed for cleaner syntax. Most pple
> will turn round and say why get OO inbuilt in EU when libraries can offer
> it?...Has anyone tried using any of them libraries? the libraries are well
> coded but the output code always has bad syntax. U can't blame the
authors!

</snip>

While

x=myObject.myMethod(theParameter)

is cleaner syntax than

x=call_method(myObject,"myMethod",{theParameter})

as is correct Diamond syntax, the latter is hardly unusable.

I am putting the finishing touches on Diamond 3.0, with many improvements.
My next project will be a preprocessor enabling dot notation.

I need to figure out a notation for events--in Diamond, events are not
properties or methods, they are a third thing.

x.y=z   means set_property(x,"y",z)
x=y.z   means x=get_property(y,"z")
x=y.z() means x=call_method(y,"z",{})

What would be good notation for
link_handler(x,"y#1",z) and raise_event(x,"y",{z}) ?

(The "y#1" in link_handler is because events can be overloaded based on the
number of parameters--it is needed because x might also have a y#0 or y#2
event.)

I'm leaning towards

x!y(1)=z   and   x!y(z)

Any suggestions?

-- Mike Nelson

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

Search



Quick Links

User menu

Not signed in.

Misc Menu