38

(Edits at the bottom.)

The Question

I was tagging a question with mutability and I noticed that there was a tag and another one called . The tag has no wiki-description and was used 86 times, and the does have a description and was used almost 1800 times.

I could be wrong, but these tags seems to be really similar to each other. A cursory look at questions tagged shows that many of them are also tagged with . That's like tagging with or with . Huh?

Why Change?

Grammatically they're the same word, with a prefix. (See edit 2 below.)

In my mind would generally refer to the idea of an object being mutable or immutable, similar to "stability" referring to something being stable or unstable. In other words, I would think that would cover both cases. Except, of course, that the usage has mostly been the other way around - the numbers show a strong preference for .

There are also two tags already mapped to : Namely, and . This makes sense, but all three tags fall under the umbrella concept of mutability, so shouldn't they all remap to a tag with a proper wiki? This would cover mutability and immutability, providing a single tag to rule them all*.

A lot of the uses for are asking about a particular situation where they want to know if something is immutable or how to make something that is immutable.

I don't think someone looking to answer mutability questions is going to look only for situations where they are being asked if something is immutable, because... well... they're opposites. Both tags mean the same thing, from complementary perspectives.

Proposed Resolution

What does the community think about combining them under ?

I propose a wiki similar to the one in use for the immutability tag, but with broader scope, like so:

Mutability is the idea that some pieces of data can be changed after creation. Such data is called "mutable." (Mut-able: It can be mutated.)

Data that cannot be mutated after it has been created is said to be immutable. Modifications are instead made by copying the data. A property of immutable data is that it is referentially transparent.

Mutability is a pattern found in many branches of programming; immutable objects are used widely within object oriented languages (such as Python's str type, Java's String and Integer type, .NET's System.String, etc.), functional programming (esp. Haskell and other pure languages), and other paradigms. The framework has mutable and immutable versions of NSArray, NSString etc.

Edit:

Some folks are positing that mutability and immutability have opposite meanings so they should be different tags.

I think a good way to consider this is from the perspective of a book index. Would mutability and immutability both be listed? Probably. But one entry would likely say "see {mutability}."

More extremely: There's no such thing as immutability. The correct word is mutability, which describes if an object is mutable or immutable.

Edit 2:

I did some more research, and immutability is the same root word as mutability. The prefix im just means not. (See this and this on English.StackExchange.com)

As folks have pointed out, immutability is the term people run into more often because mutable is the default in many popular programming languages, so the tags are used "counter to" accepted grammar.

Edit 3:

So it seems that there are a few arguments for either side. For my own benefit I'm going to try and put them here.

For:

  1. The tags should be synonyms because they're often used together anyway.
  2. Grammatically, they're the same word.

Against:

  1. Many people are interested in making something immutable, and don't care about the opposite state, so the tag is useful on its own.
  2. Grammar isn't a valid consideration here, we care about how people express their questions.

I think that there's something else to consider:

Are tags there to express intent, or are they there to help users find questions of a given topic?

If tags exist to express intent (*i.e. "I want to make something immutable," or "I want to learn about immutability in this context") then it makes sense to have two tags. I want to make something in , or I want to make something in .

If tags exist to help people find questions, then a slightly more general tag covering both cases would help people answering find appropriate questions, and by extension help askers obtain answers. If we take a subject-driven approach, instead of an intent-driven approach, we find the appropriate tags to be , and , .

The Stack Exchange Tour says:

All questions are tagged with their subject areas. Each can have up to 5 tags, since a question might be related to several subjects.

It looks to me that tagging is for subject matter, not intent. If that's the case, and you agree with my assessment of the two sides here, then I think that synonym-izing is appropriate.

*where appropriate.

34
  • 9
    Grouping like that to a [java] or [.net] programmer makes as much sense as grouping [water] with [fire] because they are elements. This does not need to be fixed. Commented Apr 12, 2016 at 17:16
  • 4
    @HansPassant would you please elaborate? I'm looking at this from a grammatical perspective for the most part. Is there something I'm missing?
    – Moshe
    Commented Apr 12, 2016 at 17:46
  • 61
    I think we'll just have to keep [immutability] around, since we can't make any changes to the posts tagged with it. :P
    – DJMcMayhem
    Commented Apr 12, 2016 at 19:30
  • 10
    @HansPassant What sort of questions would you expect to be tagged "immutability" that should not also be tagged "mutability"?
    – cimmanon
    Commented Apr 12, 2016 at 19:42
  • 16
    I'm not sure I agree with your example. I think the site would greatly benefit from a [not-jQuery] tag.
    – Stryner
    Commented Apr 12, 2016 at 19:48
  • 2
    A not-jquery tag would probably be better served by javascript. The point is that lots of things are often better described by their complementary opposite.
    – Moshe
    Commented Apr 12, 2016 at 19:49
  • 2
    I think a good way to consider this is from the perspective of a book index. Would mutability and immutability both be listed? Probably. But one entry would likely say "see {mutability}." or simply "The opposite of {mutability}". I agree all the info would be at the positive case of the noun though
    – Adriaan
    Commented Apr 12, 2016 at 20:09
  • 13
    I have no strong opinion on this, but do wish to preemptively caution against including mutable (a c++ keyword) in this discussion.
    – Shog9
    Commented Apr 12, 2016 at 20:12
  • 2
    Well... yes and no. Commented Apr 13, 2016 at 6:57
  • 5
    I believe one reason immutability is used a lot more than mutability is that mutable state is the norm, while immutable is the peculiar thing. Hence people want to emphasize when they are dealing with the "special case", and thus immutability makes more sense. Also the term immutability do exists.
    – Bakuriu
    Commented Apr 13, 2016 at 8:30
  • 3
    @Moshe: You could argue the same way that the concept is called immutability, asking whether something doesn't change. There doesn't seem to be much precedence, however immutable is far more common than mutable.
    – Bergi
    Commented Apr 13, 2016 at 16:39
  • 5
    @cimmanon: Wikipedia redirects both "immutability" and "mutability" to "Immutable object", but that's about defining the concept. For actual implementation, they represent two different kinds of issues and approaches, depending on the default behaviour of the language or framework.
    – corsair992
    Commented Apr 14, 2016 at 12:35
  • 2
    @Moshe: The simple fact is that nobody cares about the general concept of the thing they're trying to implement, but the actual technical category of the implementation, and that is the only useful way to categorize things as well. As BJ Myers pointed out in his answer, we have different tags for 'static' and 'dynamic' even though they are both opposite facets of the general concept of 'staticity' (or 'dynamicity'). Sure, tags for general concepts might have their place, but it makes no sense to sacrifice existing implementation related tags for them.
    – corsair992
    Commented Apr 14, 2016 at 13:09
  • 5
    If you insist on merging these tags, choose the tag that is most common and most intuitive... immutability. You might not personally like it, but I think you need to respect the way language is actually used over the way you'd like language to be used in these kinds of scenarios. By your own research, the community has a pretty strong preference for immutability. (Do not construe this as agreement... I still strongly disagree with merging.)
    – JDB
    Commented Apr 14, 2016 at 15:34
  • 1
    Related: meta.stackoverflow.com/questions/265601/allow-for-tag-antonyms
    – Moshe
    Commented Apr 14, 2016 at 16:10

4 Answers 4

33

I am opposed to merging into . If any synonimization or merging is to be done, it should be the other way around.

Both "mutability" and "immutability" are terms that describe the same attribute - either something is mutable (and therefore not immutable), or immutable (and therefore not mutable). Hence the dictionary and "lightness vs. darkness" analogies used above.

But the term "immutable" is substantially more prevalent when discussing mutability. Mutable objects are unremarkable; immutable objects are interesting. This request is more like taking an "absolute zero" tag and merging it into a "temperature" tag. Yes, something is either at absolute zero or not, but the former case is substantially more interesting.

The purpose of tags on SO is to make it easier for people to find questions and answers related to some topic. In programming, "immutable" is so much more prevalent that it makes no sense to redirect people searching for "immutable" to its opposite.

(As an aside, try searching for Mutable object on Wikipedia. I'm not saying we have to follow Wikipedia's example - just pointing out that there is precedent for this.)


Regarding the dictionary argument - "static" and "dynamic" are opposites. Should we merge those as well? This is not a site about the English language - tags should be about terms as used in programming, not their Merriam-Webster origins.

18
  • 1
    Tagging is in a sense very much about the English language. It's how we find things on the site. I agree that it might be easier to search for immutable. Unlike static/dynamic or dark/light, these are opposites stemming from the same word. One could pick either word and mean exactly the same thing. I wouldn't use static as a tag when I meant dynamic. Here's a question I asked 6 years ago, tagged static: stackoverflow.com/q/4124102/224988 dynamic makes noticeably less sense here.
    – Moshe
    Commented Apr 13, 2016 at 17:07
  • 5
    I agree - one could pick either word. But most people pick "immutable" because that's the interesting case.
    – BJ Myers
    Commented Apr 13, 2016 at 17:10
  • That's valid so maybe we should merge the tags the other way, as you suggested.
    – Moshe
    Commented Apr 13, 2016 at 17:27
  • 2
    Since you are opposed to merging, could you give an example where a question would be tagged [immutability] that should not also be tagged [mutability] (or vice versa)? Note that the question here is not about "mutable" vs "immutable".
    – cimmanon
    Commented Apr 13, 2016 at 17:40
  • 2
    I'm not necessarily opposed to merging, but if that does happen I think [immutability] should be the primary tag.
    – BJ Myers
    Commented Apr 13, 2016 at 18:09
  • 5
    Your answer opens with "I am opposed to merging". If you're opposed, there has to be a better reason for it than "I don't want to do it because that other guy wants to use a tag name I think is the wrong choice".
    – cimmanon
    Commented Apr 13, 2016 at 21:53
  • Or maybe instead of merging, we should synomymise [mutable] to [mutability] (and possible do a cleanup into a new [mutable-keyword] where appropriate)
    – Bergi
    Commented Apr 14, 2016 at 2:15
  • @cimmanon: If you're talking about the semantics of immutable objects, you would use immutability; if about some semantics of mutable objects, then mutability. As BJ Myers stated, this is not an English language site, and as such descriptivity should not be sacrificed just because it's possible to group opposites under a general concept (as he suggested, you wouldn't want to use just 'staticity' or 'dynamicity' to group static and dynamic, would you?)
    – corsair992
    Commented Apr 14, 2016 at 3:12
  • @corsair992 I still don't see an actual example question here. Questions discussing the "semantics of immutable objects" sounds like something that would belong over on CS.SE, not here.
    – cimmanon
    Commented Apr 14, 2016 at 10:03
  • @cimmanon: Replace 'semantics' with 'implementation' if you like. I'm sure you can find some examples if you look through the tags. Most languages are mutable by default, so implementing immutability is the issue, but some languages or frameworks might be the opposite.
    – corsair992
    Commented Apr 14, 2016 at 10:08
  • @corsair992 But I am asking you, as the person who suggests that such a question exists and is appropriate for SO, to provide an example. The burden of proof is on you.
    – cimmanon
    Commented Apr 14, 2016 at 10:59
  • 1
    @cimmanon: Sure, if you're thinking of making a follow-up proposal to merge the god and null tags… 🙄
    – corsair992
    Commented Apr 14, 2016 at 11:30
  • 4
    It is unclear to me what your answer really proposes. It starts with "I am opposed to merging", but continues with, in bold, "it should be the other way around" and finally "it would be better if these two tags were not merged". Could you clarify? Are you saying they shouldn't be merged or that they should be, but the other way around? This makes the voting on this answer a bit bizarre, because the initial answer was "do it the other way around".
    – Tunaki
    Commented Apr 14, 2016 at 16:06
  • 2
    To further Tunaki's point, the timeline of this answer reveals that most of the upvotes were cast before the "don't do this edit" (see the daily voting breakdown).
    – ryanyuyu
    Commented Apr 14, 2016 at 16:09
  • 4
    I rolled this answer back to its original revision because the timeline revealed that all voting was for the original revision. The subsequent edit completely negated the original voting on the post. Others are of course free to simply vote on JDB's contrary answer.
    – ryanyuyu
    Commented Apr 14, 2016 at 16:17
21

The tags are not the same, though they are about the same subject.

You say:

I don't think someone looking to answer mutability questions is going to look only for situations where they are being asked if something is immutable, because... well... they're opposites.

That's exactly the point.

If I'm working in a mutable language and wish to implement an immutable object, then I'm asking a question about . That is, I need to implement immutability in an environment where that is not the norm and, thus, requires some effort. I need expertise specific to my environment and someone who understands immutability, what it means and what its purpose is. Examples:

If I'm working in an immutable language and wish to implement a mutable object, then I'm asking a question about . That is, I need to implement mutability in an environment where that is not the norm and, thus, requires some effort. I don't need someone who understands immutability... I've already got that. I need someone who knows how to implement mutability in an immutable language. There's a whole class of techniques designed for this scenario that are completely irrelevant in a mutable language (see state monad, as an example). Examples:

It would make no sense to tag my question with when it is immutability that I desire, and vice versa. The audience for each tag is different. If we were going to do merge these tags, then we'd have to merge with . Yes, it's two sides of the same coin, but if my question is about "heads" then it doesn't make sense to tag my question with "tails".

I also disagree with your "intent" and "subject" dichotomy (edit #3). If I intend my subject to be about immutability (the inability to change), then it should be about immutability, not the opposite (the ability to change). "Able" and "unable" are not synonymous.

16
  • There's more nuance here than that, but if I can't articulate it well than maybe that's an issue.
    – Moshe
    Commented Apr 14, 2016 at 2:00
  • 4
    @Moshe - If I can use a more specific word to more accurately describe what I want to do, why would a general one be better for the community? I don't think you've answered that in this case.
    – JDB
    Commented Apr 14, 2016 at 2:02
  • The concept is called mutability, regardless of whether it's turned on or off in a language by default. Stateful and stateless could he synonyms of state, by the same logic. The difference is that mutability happens to be the same word as the positive form, where as stateful and statefulness are different.
    – Moshe
    Commented Apr 14, 2016 at 2:03
  • Because tags aren't "what I want to do" - that's what the question is for. Tags are for categorizing questions.
    – Moshe
    Commented Apr 14, 2016 at 2:04
  • 10
    I think there's an important distinction that should be preserved. If I were programming in Javascript, then immutability is actually pretty hard to implement and I would want to use that more specific term. If I were programming in Haskel, then mutability is actually pretty hard and I would want to use that term. I don't see how combining them is beneficial to the community, and I would find it annoying. I agree that there's a bit of a void in the middle - if I wanted to discuss the topic of mutability in general, then there's not really a tag for that (like there is with state).
    – JDB
    Commented Apr 14, 2016 at 2:08
  • Adding the two letters to mutability contributes little, but it does cloud the tag options with two similar tags.
    – Moshe
    Commented Apr 14, 2016 at 2:11
  • 4
    Merging shouldn't be about folding more specific terms into more general terms... it should be about associating synonymous terms, like vb and visual-basic. Otherwise we could merge most tags with "programming" and call it a day.
    – JDB
    Commented Apr 14, 2016 at 2:22
  • 1
    I don't think "immutability" is synonymous with "mutability" for the reasons already given.
    – JDB
    Commented Apr 14, 2016 at 2:25
  • 1
    No one is suggesting merging "immutable" with "mutable" (which would be analogous with "stateless" and "stateful"), the question is about "immutability" and "mutability". How does immutability/mutability offer anything over immutable/mutable?
    – cimmanon
    Commented Apr 14, 2016 at 10:55
  • 1
    @cimmanon: As Shog9 pointed out, mutable is a specific C++ keyword, and immutable seems to be a synonym of immutability.
    – corsair992
    Commented Apr 14, 2016 at 12:09
  • 5
    @cinnamon I still don't see how the community benefits from merging more specific terms into less specific terms. Merging is supposed to be for synonyms, or that's how I've understood it. As an example, in Christian theology, one of God's traits is "immutability". It would be odd to have a lecture on the "mutability of God" where the lecturer advocates that God is immutable. The terms have technical meanings within that field. Similarly, I'd feel like a question about making a JS object immutable should be tagged "immutability", not "mutability", for the same technical reasons.
    – JDB
    Commented Apr 14, 2016 at 12:26
  • Actually, @JDB, I think that that title is appropriate for that lecture. It's the same way we call Truth tables what we call them, despite the possibility of a table that's got only false values in it. Does that make it a "Falseness" table?
    – Moshe
    Commented Apr 14, 2016 at 14:58
  • 1
    @Moshe Ngram would disagree with you on that.
    – JDB
    Commented Apr 14, 2016 at 15:01
  • 2
    @Moshe Obviously theology is irrelevant to this discussion. The general point is that, within a particular field, words that would normally be nearly synonymous can take on significant individual meaning, to the point that they are no longer synonymous. Whether or not that's the case here is up to personal opinion, but my opinion is that is the case and that these words, within the field of computer science and programming, should not be considered synonymous.
    – JDB
    Commented Apr 14, 2016 at 15:11
  • @JDB understood re: theology not being relevant. I updated the post with some more food for thought.
    – Moshe
    Commented Apr 14, 2016 at 15:17
6

I agree with the proposal of merging with . Mutability encompasses whether a variable is mutable or immutable. We discussed this in chat, and the best analogy we came up with for the request is this:

He wants to synonimize [darkness] into [lightness]

I suspect the popularity of [immutability] over [mutability] stems from users not actually reading the tags they're using and "immutability" was close enough to "immutable" that they just went with it.

6
  • 4
    why merging instead of a synonym? from here, "As merging is not (easily) reversible, it should be done with caution and only when a synonym is established."
    – eis
    Commented Apr 13, 2016 at 10:55
  • Why not merging? The words convey the exact same meaning despite their root words having opposite meanings (eg. opaque and transparent are opposites, but increasing the opacity of something is decreasing its transparency). Note that pre-synonym questions will not be eligible for closure via mjolnir (see: meta.stackoverflow.com/questions/307207/…)
    – cimmanon
    Commented Apr 13, 2016 at 11:13
  • Well, at least because of the "only when a synonym is established" requirement. Synonyms should be merged anyway eventually.
    – eis
    Commented Apr 13, 2016 at 11:27
  • 3
    "I suspect the popularity of [immutability] over [mutability] stems from users not actually reading the tags" sounds unlikely to me. I'd guess they just entered [immutable], which resolved to [immutability] automatically. Btw, there's nothing wrong with the term "immutability" either.
    – Bergi
    Commented Apr 13, 2016 at 16:43
  • 8
    "I suspect the popularity of [immutability] over [mutability] stems from users not actually reading the tags" - No, the popularity of [immutability] is due to the popularity of the term as used by programmers. The primary reason for talking about "mutability" is when you're talking about making something immutable.
    – BJ Myers
    Commented Apr 13, 2016 at 16:45
  • 1
    @BJMyers And as you point out in your answer, on Wikipedia, "Mutable object" redirects to "Immutable object".
    – DavidRR
    Commented Apr 14, 2016 at 12:21
-9

Mutable is typical and clear, so if you ask, you probably going to make something immutable.

And you found 1800 questions over 86 ones.

Seems clear enough that it shouldn't move in most cases so use as primary.

8
  • 1
    Everything is not mutable. Haskell is one such language where being immutable is the norm, and being mutable is the rare case.
    – cimmanon
    Commented Apr 13, 2016 at 17:43
  • In Python tuples are immutable. In Erlang, bound variables are immutable. This answer makes no sense.
    – Tommy
    Commented Apr 13, 2016 at 18:28
  • @Tommy, then why there are 1800 questions about immutability, and less then a hundred about mutability?
    – Qwertiy
    Commented Apr 13, 2016 at 18:31
  • because of the exact reason @bj_myers said. You wouldn't tell someone "I can breathe" because it is uninteresting and the norm. But you would certainly try to say "I can't breathe" because that is far more.. interesting. Please note that your original answer had "Everything is mutable", which you have now removed, and I was replying to your original answer.
    – Tommy
    Commented Apr 13, 2016 at 18:33
  • @Tommy, right. But then why use first way for tagging? By the way, I updated the first sentence.
    – Qwertiy
    Commented Apr 13, 2016 at 18:35
  • 3
    your new answer is now the same as BJ Myers's answer and in that case I agree. also this picture, while mildly amusing, does not really help anything.
    – Tommy
    Commented Apr 13, 2016 at 18:36
  • @Tommy, it was my original idea, seems like I've badly expressed it. I ment "everything" like everithing in daily life, things that you see, but not as any programming structure is mutable.
    – Qwertiy
    Commented Apr 13, 2016 at 18:39
  • @JDB, you are free to remove it.
    – Qwertiy
    Commented Apr 14, 2016 at 6:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .