Skip to main content

Timeline for Linked list with iterators

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Oct 17, 2018 at 16:41 comment added Toby Speight There's nothing that forbids operator+() - it's merely not required (and it won't get used by generic algorithms).
Jul 2, 2014 at 20:26 comment added TemplateRex only the semantics of a!=b should be !(a==b), not the actual implementation. You could equally define a==b as !(a!=b)
Jul 2, 2014 at 19:45 comment added vnp You are asking a very valid question. A short answer is that equality is fundamental. A long answer would explain what fundamental really means, and it is a topic for a very long conversation. Again, Stepanov addresses it constantly, and explains it better than I'd ever hope to.
Jul 2, 2014 at 19:39 comment added Beta I agree that one should be defined as the negation of the other (for at least three reasons), and I tend to write op== first and then define op!= in terms of it, as a matter of style, but why "must" it be that way? Apart from awkwardness, what's wrong with defining op!= first and then negating it to get op==?
Jul 2, 2014 at 19:12 comment added vnp @Beta Briefly: a "not equal" relation is a negation of an "equal" relation, by definition. An attempt to define it in any other way is wrong. A very interesting discussion is in Programming Conversations 11 (part 2 specifically). However I highly recommend all of them.
Jul 2, 2014 at 18:10 comment added Beta I find it hard to believe that a good reason could not be stated briefly enough to fit here, but could you at least tell us which video?
Jul 2, 2014 at 17:07 comment added vnp I can't quote a video here, sorry. Alex Stepanov goes deep on the topic in his lectures at youtube.com/user/A9Videos/videos
Jul 2, 2014 at 13:08 comment added Jerry Coffin [citation needed] for the requirement that operator != be implemented as a negation of operator==.
Jul 2, 2014 at 7:49 history edited vnp CC BY-SA 3.0
added 29 characters in body
Jul 2, 2014 at 7:32 history answered vnp CC BY-SA 3.0