Hacker News new | past | comments | ask | show | jobs | submit login

I'm well aware of the pros and cons of mutability. I object (hah!) to this novel new use of the word "object". The concept is well defined by the ECMAScript spec.

Your first link's first sentence's first two words are "Immutable objects". No problem there. It doesn't conflate objects with mutability.




you know how unsufferable it is when people bog a conversation down with semantics instead of ideas.

the point is obvious.

Being that every single language on Earth uses objects for non-primitive data structures that should be inferrable to a reasonable person.

a data structure in that context is clearly an ordered grouping of objects versus an unordered/loose grouping of objects.


I mean some languages don't.

I have ideas but I don't think I'm getting them through. Most of the problems functional proselytizers have with objects come from inheritance and mutability. Instance methods from classes don't seem to conflict with any of the functional tenets.

As for mutability, I think it's good sometimes. Dates should have been immutable, but Maps are a good fit for mutation. Immutable maps might make sense too sometimes.

But I find it difficult to communicate about any of this when fundamental terminology is used in novel ways.


what languages don't use objects to implement non-primitive data structures?

like a binary tree for example


C# allows you to implement some data structures using `struct`s instead of `object`s. Probably not binary tree though.

I honestly still don't understand what you're getting at.

> a data structure in that context is clearly an ordered grouping of objects versus an unordered/loose grouping of objects.

What's an "ordered grouping"? What does "loose" mean? These are not gotchas. I'm trying my best here.

For me, if I were implementing a data structure, I would probably use objects. In fact, I'd probably use a class. I'm not trying to argue that data structures shouldn't be implemented in terms of objects or anything. My point is just that the tonal.js description is kind of nonsensical. Or at least hard to understand.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: