3 ms·
That's a good question. The problem is that syntactically calling a method with no arguments and accessing a field will look the same, if .f is used to access
by soegaard 4y ago
That's a good question.
The problem is that syntactically calling a method with no arguments
and accessing a field will look the same, if .f is used to access a field:
(foo .m1 arg1 .m) ; m is a method name
(foo .m1 arg1 .f) ; f is a field name
I guess, one could introduce `_f` for field access.
Right now one can use `getattr` or one can bind the result of `(foo .m1 arg1)` to an indentifier `o.` and then use `o.f`.