Skip to content

Commit

Permalink
trim NewType fluff
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfitz committed Oct 12, 2019
1 parent f620c91 commit 6a89706
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions msg/COS_NewType.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,10 @@ cos.add(`define translate | assign prev $translate | ? x |
(map $tail | select-match (? x | = field | first $x) $fields)) |
let ((self | reflective | lambda (self) |
let ((this | setup-this $ext-this $self)) |
let ((ignore-this 1)) |
lambda (method) |
@@ class-cond $name $args $fields)) |
lambda (method) |
@@ class-cond $name $args $fields)) |
begin (self new) $self`);

cos.add(`define translate-google | assign prev $translate | ? xx |
if (not | function? $xx) (prev $xx) |
if (not | = class | head $xx) (prev $xx) |
let ((name | list-ref $xx 1)
(args | list-ref $xx 2)
(fields | tail | tail | tail $xx)) |
translate | quote @@ | + 1 1`);

cos.add(`class point (x y)
(method x $x)
(method y $y)
Expand All @@ -256,25 +247,6 @@ cos.add(`not | instanceof int $point1`);
cos.add(`instanceof int 5`);
cos.add(`not | instanceof point 5`);

if (false) {
cos.doc(`For some reason I fool around with making virtual calls here. I don't remember why,
and I don't understand the code any more.`);

cos.add(`class c1 ()
(method getid 100)
(method altid | this getid)`);

cos.add(`class c2 ()
(field super-ref | make-cell 0)
(method new | set! $super-ref | c1 $this)
(method super | ? x | (get! $super-ref) $x)
(method unknown | ? x | self super $x)
(method getid 200)`);

cos.add(`= 100 | c1 new altid`);
cos.add(`= 200 | c2 new altid`);
}

cos.header('OBJECT', 'wrapper class for cells');

cos.add(`class cell (initial-value)
Expand Down

0 comments on commit 6a89706

Please sign in to comment.