[REBOL] Re: IS REBOL object oriented?
From: nitsch-lists:netcologne at: 5-Jun-2002 4:27
Am Dienstag, 4. Juni 2002 19:42 schrieb Abdel Belkasri:
> Hi all,
> I admit I don't know a lot about REBOL, but I need to access this
> platform for my boss.
> My first impression was that REBOL is an Internet Operating System that
> uses a script (similar to PEARL, or CSHELL) to do some shell programming!
> is this impression correct?
AFAIK yes. well, i have an IOS-evaluation-account, and start reading.
IOS is like an everywhere mirrored file-system.
messages are done by changing a file, telling ios its changed.
on the other side tell ios to watch a file, reread on change.
then ios mirrors.
if the other side is offline, it gets the file next time when connecting.
thats enough to do Reblets for instant messengers. with log.
for edited normal files the dektop-icon turns red when changed locally.
one has to re-publish after changes by hand when thinking "finished".
theres a version-control for undo too.
for collaboration partners talk like "hmm, ok, i change it" - "ok, uploaded"
with the messenger and can see the same file a moment later.
files are files, so they are easily with external tools.
like listing all files which are changed locally.
of course scripts can run on the server too, for coordination.
but while each user can script its client,
server-scripts need admin.rights.
> The marketing guy told my boss that REBOL is object oriented
> programming...I didn't see anything like that by looking to the sample
> programs that come with the REBOL trial version...what's up with that?
hmm. rebol and oops.. marketing needs short descriptions sometimes :)
IMHO, well, yes, oops works pretty well in rebol.
so well, one seldom sees it.
think of a script itself as the main-class.
the pre-written objects are well choosen and well reusable.
most of the time one does not need to define big extra classes.
also, there are dialects. they are more the rebol-way.
conventional oops declares related objects with methods.
and tells you how to use them. Container, addListener, Event, ..
rebol uses a compiler-compiler. "parse".
its great. writing a special language can be done in some lines.
they create and connect objects for you.
and can always include/move real rebol.
for key featureare dialects like "layout"
view layout[title "helloworld" button "quit" [alert "bye" quit] ]
like scripting a gui-builder.
returns a very complex object.
the rebol-code [alert "bye" quit]
is plugged somewhere deep in the appropriate place.
view it with "view". press the button.
writing dialects is comparable in size to the oops declarations.
using them much simpler.
but access to the metal (screen-faces) if needed.
parse itself is inbuild, but the usage is like a dialect. a little language.
parsers are short because they parse rebol-blocks.
these are pre-parsed source.
simple stuff is already identified and put in an object.
like %my-file or dates, 127.0.0.1, http://somewhere or [me--my-server--org] .
so the basic syntax of the parser is inbuild. and standardized.
every little language understands them.
including rebol-code, which can be seen (and handled)
as a dialect. a pretty complex one, compared to the others.
nearly as complex as programming-languages ;)
this basic syntax is used too to store data.
similar to xml.
which you write to a file. telling ios its changed.
somewhere someone will listen. sooner or later. :)