@benfry and I were just talking about the data classes from Processing like IntDict, FloatDict, StringList etc in JS and we came to a conclusion that it would be nice to implement some of these for p5. I am thinking:
NumberList
StringList
NumberDict
StringDict
Obviously without types in JavaScript there can just be a Dict and List, however, I think it would be nice to separate out Numbers and Strings. For example, there are enough API differences and reference-wise it would be confusing for it to be all in one. If you want a more advanced list or dictionary with multiple data types in JS then you would implement it yourself with native JS arrays and/or objects. But these would be simple ways to do quick operations on lists and dictionaries with basic data types. This aligns with Processing: IntDict for simple dictionary, HashMap from Java for more advanced.
@therewasaguy am I correct that these have not been started yet? I am very happy to take on working on these (likely after the ITP semester) and thought it might be nice to start the discussion here.
Thoughts?
@benfry and I were just talking about the data classes from Processing like
IntDict,FloatDict,StringListetc in JS and we came to a conclusion that it would be nice to implement some of these for p5. I am thinking:NumberListStringListNumberDictStringDictObviously without types in JavaScript there can just be a Dict and List, however, I think it would be nice to separate out Numbers and Strings. For example, there are enough API differences and reference-wise it would be confusing for it to be all in one. If you want a more advanced list or dictionary with multiple data types in JS then you would implement it yourself with native JS arrays and/or objects. But these would be simple ways to do quick operations on lists and dictionaries with basic data types. This aligns with Processing:
IntDictfor simple dictionary,HashMapfrom Java for more advanced.@therewasaguy am I correct that these have not been started yet? I am very happy to take on working on these (likely after the ITP semester) and thought it might be nice to start the discussion here.
Thoughts?