Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Rebol von Neumann properties (RIP ifs-for-whomever cont.) Re:(3)

From: lmecir:geocities at: 17-Oct-2000 9:02

Hi,
> If I understand your use of the term "evolving language" correctly, > back in the 70's we used the term "extensible language" for the same > thing (or something quite similar). That term implied that the > programmer could: > > * add new syntactical structures (notation), > * add new control structures, > * create new datatypes and associated operations, and that > having done so, > * the extended language would appear as a whole language, without > obvious "seams" between the core language and the extensions, and > * there should not be a significant performance penalty for using > the extensions.
Extensible Language seems perfect.
> > I don't think, that an Evolving Language must be able to do > > something like: > > > > a: [append a [+ 1] 1] > > do a > > > > (a von Neumann property - Pure Self Modifying Code), but I do > > think, that an Evolving language must be able to do: > > > > a: create-a-translation-of something > > do a > > > > , which may be described as a von Neumann property of the language > > too, but this is a code I would like to describe as a provision to > > understand Something with new syntactic/semantic rules (a new > > dialect, if you like, but it might not be a new dialect, but a new > > stage of the original language evolution). > > > > I believe I understand the distinction you're drawing here, but I > must confess that I don't yet grasp HOW to enforce it without either > performance penalties or loss of introspection. For example, if I > imagine something like > > active-thing: load-to-read-only-code data-representation > do active-thing > > ALONG WITH the ability to introspect > > interesting-property: obtain-state active-thing selector > > then wouldn't I be able to do this > > altered-property: mutate interesting-property > active-thing: load-to-read-only-code replace/all > interesting-property altered-property > do active-thing > > and be right back with self-modification, albeit at a severely > lowered performance? > > Have I missed something? >
The performance subject is very questionable, IMHO. I would call your sample a WYSIWYG code. Let's try to compare it with Pure SMC like: a: [append a [+ 1] 1] do a Don't you see any difference? If I would like to do it in a WYSIWYG fashion, I would have to write: a: [append a [+ 1] 1] do copy a Let's compare the results: the first case:
>> a: [append a [+ 1] 1]
== [append a [+ 1] 1]
>> do a
== 1
>> do a
== 2
>> do a
== 3
>> do a
== 4
>> do a
== 5
>> do a
== 6
>> do a
== 8 the second one:
>> a: [append a [+ 1] 1]
== [append a [+ 1] 1]
>> do copy a
== 1
>> >> do copy a
== 2
>> do copy a
== 3
>> do copy a
== 4
>> do copy a
== 5
>> do copy a
== 6
>> do copy a
== 7
>> do copy a
== 8
>> do copy a
== 9
>> do copy a
== 10
>>
Regards Ladislav