[Opensim-users] LSL could support nested lists

Ethan Gardener eekee57 at fastmail.fm
Wed Feb 27 09:05:05 UTC 2019


On Tue, Feb 26, 2019, at 10:16 PM, Haravikk wrote:
> [...] I mean seriously, no proper array but instead we 
> get a linked-list that is fully copied on even minor modifications, 

I remembered this just as I was falling asleep after my last big email.  Basically, LSL has two ways of preventing reference loops, each of which is quite good enough on its own.  Given that a list is copied on even the smallest of modifications, there's no reason to prevent lists containing list references. There's no way to make a circular reference because each list becomes immutable before its reference can be obtained.  

We could have nested lists as soon as appropriate functions could be designed and implemented.  (Now I think about it, I can't understand why no-one's implemented it before.)


Don't get hung up on it being a linked list, the truth about performance is often very surprising and quite contrary to popular opinion.  For instance, a hash table may spend more time hashing than a linked list would searching.  This was an actual *serious* problem a few years ago with programmers producing terribly slow designs because they thought some techniques were always faster.  It's probably still going on, but I stopped paying attention because it makes me angry.  (Same with the async i/o / node.js hubris.)  In any case, because it's always copied, the actual implementation could be anything.


More information about the Opensim-users mailing list