-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
41 lines (37 loc) · 1.58 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
TODO items -- and various notes as well
o The whole setting-up-accessors bit is kludgy and messy. Too much
quoted and eval'd and sprintf'd stuff.. it needs some desperate
reworking towards elegance.
o Setting default values and adding finalisers is all well and good
when the variables are only used by a single entity -- but not so
hot when they're actually shared. You don't want to
initialise-to-default an existing variable someone else was using
before you joined, and you don't want to delete a shared element
from the cache just because *you're* exiting. Adding controls for
these needs to be a fairly high priority for this package to be
truly useful..
o Should private variables be allowed to have user-set names?
[For now, no.]
o Need to test true sharing, in which cell names are *not* necessarily
unique to each test, and may be left around between them
o Annotating the return value with singleton methods that update the
cache works, but unexpectedly has some issues:
f = Foo.new
f.shared_cell = {}
p1 = f.shared_cell
f.shared_cell['k1'] = 'v1'
p1
=> {'k1'=>'v1'} # As expected and designed
p1['k2'] = 'v2'
f.shared_cell
=> {'k1'=>'v1','k2'=>'v2'} # As expected and designed
f.shared_cell = 5
p1
=> {'k1'=>'v1','k2'=>'v2'} # NOT as expected
p1['k3']='v3'
f.shared_cell
=> {'k1'=>'v1','k2'=>'v2','k3'=>'v3'} # NOT as expected
How to deal with this? Add some sort of counter such that direct
frobs of the ivar invalidate (delete singleton methods) any
outstanding references?
o Pass more information to the accessor naming block.