dotgnu-visionaries
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Visionaries] DG-Scheme


From: Peter Minten
Subject: Re: [Visionaries] DG-Scheme
Date: Thu, 24 Apr 2003 17:53:05 +0200

Peter Minten wrote:
> 
> Hi folks,
> 
> I did a little thought experiment today, making Scheme truly OO and AO (Aspect
> Oriented), it turned out that's not so hard, if you add the idea of metadata. 
> A
> language that is flexible, OO, AO and has metadata would be the ideal language
> for many webservices. I believe DG-Scheme (as I call it) meets those
> qualifications. What follows is an explanation about the specifics of 
> DG-Scheme
> (well, as far as I've managed to map them out in a couple of hours).

Additions.

The @ sign is also used in complex numbers (polar notation), the . sign is also
used in floating point numbers. If this conflicts with the metadata and field
reference use the rule is that complete tokens go for operators, thus the
interpretation of 1.0.foo is field foo of 1.0 (note that varnames cannot consist
of only decimals anyway), the interpretation of address@hidden@bar is metafield 
bar of address@hidden
To allow easier interpretation the electric braces can be used, {1.0}.foo <=>
1.0.foo <=!=> 1.{0.foo}. 

Classes and modules are first class objects (you can store a class in a
variable). Modules could be implemented as abstract classes, but for the sake of
simplicity this is not done.

Metadata operates over memory locations. Since multiple variable names can refer
to the same memory location foo.a can be the same procedure as bar.b . The
procedure has to be defined somewhere however, the immediate parent (the thing
in which it is defined) is referred to in the metadata. All the variable names
that are bound to a memory locations are accessible from the metadata (now
that's reflection :-).

Every object can have methods. This is used to implement class methods, module
methods and singleton methods. Singleton methods are methods that are defined in
an object (thus essentially every method is a singleton method), but the common
use of the term is that they are methods that are not defined in class or module
objects. Singleton methods can be defined like this: (define (obj.method bla bla
bla) bla bla bla), easy as pie. Instance methods are actually singleton methods
of a class that are copied to the instance on construction and go into the
object scope, the last part is an exception to the scoping rules but necessary.

Greetings,

Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]