[Top][All Lists]

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

[Visionaries] Some more WebScheme

From: Peter Minten
Subject: [Visionaries] Some more WebScheme
Date: Thu, 26 Jun 2003 16:46:53 +0200
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.4) Gecko/20030529

Hi folks,

I've started coding the WebScheme baselib, so far (only Exception is complete, just started on Number, String and Port) everything is going fine. While doing the coding I invented some new things:

WebScheme now allows YAML documentation comments (prefixed with three semicolons) like this:
;;;description: Base class of the exception mechanism.
;;;author: Peter Minten
;;;copyright: Copyright (C) 2003 Peter Minten
;;;license: GPL v2 or later
;;;CVS_TAG: $Id$
(define-class Exception ...)

The explicit Bindings are gone, static fields are a good enough replacement and not having Binding objects simplifies things a lot.

Primitives are now in the Primitive module (for example Primitive.set!).

A special macro named define-prototype has been added for convenience (the expansion is: (define-prototype ...) -> (define prototype parent.prototype ...)).

The keywords are beginning to get clear:
this = this object
owner = the object that this object is a field of
parent = superclass
super = same method in the superclass ((Foo is subclass of Bar) Foo.prototype.a.super = Bar.prototype.a)

Maybe I'll add a special parent.prototype keyword, but currently I haven't seen much use for it.



reply via email to

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