Classes and methods get .fln syntax
This commit is contained in:
parent
8d24b024a2
commit
3520e2d73e
9
TODO.org
9
TODO.org
@ -662,6 +662,11 @@ writes it back.
|
||||
A clean =flan check= lists the whole prelude (about 170 lines). Clean should print
|
||||
nothing, or only the file's own definitions behind a flag.
|
||||
|
||||
** NEXT Classes and methods have .fln syntax
|
||||
Decided 2026-09-26: ~class Lambda(param, body, env)~, ~generic describe(v) -> dyn~,
|
||||
~method describe(f: Lambda)~ plus a block (the class as the parameter's type),
|
||||
~multi kind(v) -> dyn = type-of(v)~, ~method kind(v) when :int~ plus a block.
|
||||
|
||||
** NEXT A struct fits on one line
|
||||
Decided 2026-09-26: ~struct Pt(x: i32, y: i32)~ beside the block form, like a data
|
||||
case; union and a struct with a parent too.
|
||||
@ -680,10 +685,6 @@ text — =(Ptr %s)=, =(clone v)=, =(the T x)= in most of =check.ml= and =parse.m
|
||||
runtime's =(get 0 :body)= and =(/ x 0)= — still print parens; each is fixed per
|
||||
message as it is met.
|
||||
|
||||
** CANCELLED Sugar for defclass, defgeneric, defmulti and defmethod
|
||||
CLOSED: [2026-09-26]
|
||||
The fallback, =defmethod(area, point, [p]):=, reads well enough.
|
||||
|
||||
** TODO The shims in sand.flan can go
|
||||
=sand.flan= defines =dyn->f64= and =dyn->u32=, one-line functions whose only job
|
||||
is that their parameter slot unboxes. Every call site can write =(f64 d)= and
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user