1
0
forked from alex-eg/sex
Files
sex/tests
alex-eg bbdedb9777 put the method in the head, not in a field position
(. v length) made the shape of a form depend on the receiver's type:
(. a b c d e) was either the path a.b.c.d.e or a/b called on c d e,
and nothing but the ops registry could say which. Resolution had to
arbitrate, a field won, and so adding a field named length to vec2
turned every (. v length) in reach from a call into a read -- silently,
and only sometimes into a type error.

Resolution may need types; shape must not. (.length v) puts the method
where an operator belongs, so (. v x) is always the field x, a field
and a method of one name coexist, and a reader needs no symbol table
to see where the arguments start.

Which of &, * or nothing goes in front of the receiver now follows
from its own type against the method's self, rather than from whether
the caller wrote . or ->, so (.length v) and (.length p) are the same
call and -> is member access again and nothing else.

The reader already allowed it: only a standalone . becomes dot-access,
and .foo is the ordinary symbol designated initializers are made of.
2026-10-03 23:17:44 +03:00
..
2026-09-30 00:09:32 +03:00
2026-04-29 22:48:55 +03:00
2026-09-15 16:32:55 +03:00
2026-10-03 22:46:39 +03:00
2026-04-29 22:48:55 +03:00
2026-09-30 00:08:19 +03:00
2026-04-29 22:48:55 +03:00
2026-04-29 22:48:55 +03:00
2026-04-29 22:48:55 +03:00
2026-10-03 22:59:15 +03:00
2026-09-30 00:09:32 +03:00
2026-04-29 22:48:55 +03:00
2026-04-29 22:48:55 +03:00