This came up in https://bugs.webkit.org/show_bug.cgi?id=319919 / WebKit/WebKit#71594 ... The spec says:
the index of the random function among all the random functions used in the same property value
But it's not clear to me that this should be "among all random functions of any type, grouping random() and random-item() together" vs "among all random functions of a given type, treating random() and random-item() separately".
The goal is for the random functions to be maximally random, but this is more simply accomplished by giving each type of random function its own bucket, i.e. making the function name part of the random caching key. That also avoids complications with these functions resolving at different times.
This came up in https://bugs.webkit.org/show_bug.cgi?id=319919 / WebKit/WebKit#71594 ... The spec says:
But it's not clear to me that this should be "among all random functions of any type, grouping
random()andrandom-item()together" vs "among all random functions of a given type, treatingrandom()andrandom-item()separately".The goal is for the random functions to be maximally random, but this is more simply accomplished by giving each type of random function its own bucket, i.e. making the function name part of the random caching key. That also avoids complications with these functions resolving at different times.