Hacker News new | ask | show | jobs
by Olical 4704 days ago
So what if I made immutable. You can only set once and unpack to a function that can name the values. I could also drop the valueOf usage.

Does that sound saner? It is definitely simpler and a lot closer to an actual tuple implementation.

I want to turn this into a small repository so maybe I will take the little good bits and drop anything unnecessary.

1 comments

Actually thinking about it more you might want to have "Tuple" and "MutableTuple" objects. In languages that use parentheses notation for tuples you need to decide which one you want, but since you have names you can have both just with different names.