- changed title to Empty List singleton
- marked as enhancement
- edited description
Empty List singleton
Issue #98
new
Click here to view original trac ticket.
Empty lists cost memory - the cost could be reduced by using a singleton empty list object. All empty lists would point to the singleton empty list, and a new list is created first when the list needs to be modified.
Comments (2)
-
reporter -
reporter Some problems with this idea and why it may not be feasible to implement:
- An empty list singleton would naturally have to occur in many places in the AST to be useful
- If the singleton is in many places of the AST then the parent pointer can be considered incorrect for that node
- Any inter-type declarations for the singleton should not be used to store information in the node, for example line number information. Such info becomes clobbered.
- Log in to comment