[REBOL] Re: Is Rebol OO?
From: AJMartin:orcon at: 24-Jan-2004 11:47
Jason wrote:
> As I understand it, Rebol was created to provide an experimental base for
developing language ideas inspired by natural human speech and writing. So
the idea of 'Dialects' and how to implement those was very influential on
Rebol's features. A key tool for creating dialects in Rebol is the 'parse'
function. There is much more to using it than meets the eye. And I believe
not yet enough examples or use of dialects for most people to understand yet
the long-term implication of the idea or how well this works in reality.
Here's an example of OO code in C#:
p = new Panel ();
Button Cancel = new Button ();
Cancel.Text = "Cancel";
Cancel.DialogResult = DialogResult.Cancel;
Cancel.FlatStyle = FlatStyle.System;
p.Controls.Add (Cancel);
CancelButton = Cancel;
Button OK = new Button ();
OK.Text = "OK";
OK.DialogResult = DialogResult.OK;
OK.FlatStyle = FlatStyle.System;
p.Controls.Add (OK);
The above creates a Panel control, and adds two buttons, one marked
Cancel
, the other marked "OK". If it were expressed as a Rebol dialect,
I'd use something like:
Panel [
Button/System "Cancel" 'Cancel
Button/System "OK 'OK
]
Which one would you prefer? :)
--
Andrew J Martin
ICQ: 26227169
http://www.rebol.it/Valley/
http://valley.orcon.net.nz/
http://Valley.150m.com/