Closed dumblob closed 3 years ago
I wouldn't use the same syntax as Extractions, but maybe using the same set
syntax...
set d [dict]
set $d key value
Hey! That's not difficult to implement! set
could check if argument1 is an NameAtom and, if not, call argument1.set(other_arguments)
. And that would benefit third-party types a lot.
Is set
extensible_to/usable_with user-defined "types" also?
Not yet. But making it check the type of the first argument and calling firstArgument.set(...)
in some cases will do the job.
Implemented in 0.1.2.
It seems that e.g. for a
dict
the syntax for setting a value is "special" - worse, it's specific todict
and no other type.I was thinking whether the extraction syntax could be somehow leveraged not only for reading (ranges of) values, but also generally for setting those values.