Multiton: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: up to "end class")
m (→‎{{header|Phix}}: new_dict remark)
Line 78: Line 78:
their own locking anyway, not that it is difficult to invoke enter_cs() and leave_cs().<br>
their own locking anyway, not that it is difficult to invoke enter_cs() and leave_cs().<br>
I thought about adding a get_multiton() function to avoid calling new() all the time, but it would (probably/almost certainly) just invoke new() itself anyway.<br>
I thought about adding a get_multiton() function to avoid calling new() all the time, but it would (probably/almost certainly) just invoke new() itself anyway.<br>
Put this (up to "end class") in a separate file, to keep allowed and instances private. Classes are not [yet] supported under pwa/p2js.
Put this (up to "end class") in a separate file, to keep allowed and instances private. Classes are not [yet] supported under pwa/p2js.<br>
Technically I suppose this should really use new_dict()/getd()/setd(), but I'm quite sure you'll cope somehow..
<!--<lang Phix>(notonline)-->
<!--<lang Phix>(notonline)-->
<span style="color: #008080;">without</span> <span style="color: #008080;">javascript_semantics</span>
<span style="color: #008080;">without</span> <span style="color: #008080;">javascript_semantics</span>