data.tree icon indicating copy to clipboard operation
data.tree copied to clipboard

Remove reserved words

Open gluc opened this issue 9 years ago • 0 comments

Currently, you cannot use reserved names as attributes of a Node object. This is a big limitation. Also, it requires lots of checking. For example, Node$new("name") currently works, but gives problems when accessing this node from it's parent.

There is no solution to this. Though a somewhat better approach would define:

  • reserved names start with a .
  • custom attributes can be anything, except they cannot start with a dot

This would also make checking much faster.

Another advantage would be that with code completion (e.g. in RStudio), you could simply type mynode$. and it would list all the non-custom attributes. Currently, these are all mixed, and that is sometimes confusing.

gluc avatar May 24 '16 20:05 gluc