August 04, 2008Re: What is Invariant Good For?
Posted in reply to JMNorris
JMNorris wrote: > I like "invariant". The expression "invariant variable" has a satisfyingly oxymoronic ring to it. :-) I've thought about "invariable" from time to time. :)
August 05, 2008Re: What is Invariant Good For?
Posted in reply to Knud Soerensen
"Knud Soerensen" <firstname.lastname@example.org> wrote in message news:email@example.com... > Koroskin Denis wrote: >> On Sun, 03 Aug 2008 14:33:55 +0400, Knud Soerensen <firstname.lastname@example.org> wrote: >> >>> Peter C. Chapin wrote: >>>> Walter Bright wrote: >>>> >>>>> http://www.reddit.com/r/programming/comments/6ui1q/d_what_is_invariant_good_for/ >>>>> >>>>> >>>> >>>> For what it's worth, I agree with some of the posts on the article itself that "immutable" would be a better word to describe this concept than "invariant." I've done some functional programming and I immediately understand what immutable means (and why it is good). With invariant I had to read about it first. The word invariant makes me think of class invariants and loop invariants... a somewhat different concept. >>>> >>>> Peter >>> >>> I agree invariant also leads my thoughts into other things. >>> >>> Walter says in a comments that there is alot of momentum behind invariant. >>> >>> To verify that I have made a poll, please vote and let us see http://jyte.com/cl/immutable-would-be-better-than-invariant-in-the-d-programming-language >>> >>> >>> >> >> Nice idea but... I wouldn't sign up for the site just for a vote. Sorry. > > The site uses openid, so if you already have a openid you can just login. A lot of big sites provide openids, so you might already have one see here http://openid.net/get/ > > -- > Crowdnews.eu - a social news site based on sharing instead of voting. I avoid openid.
August 11, 2008Re: What is Invariant Good For?
Posted in reply to Paul D. Anderson
Paul D. Anderson wrote: > Bruce Adams Wrote: > >> On Sun, 03 Aug 2008 02:52:10 +0100, Sean Kelly <email@example.com> wrote: >> >>> == Quote from Walter Bright (firstname.lastname@example.org)'s article >>>> Bruce Adams wrote: >>>>> It strikes me that 'dibblego' is some kind of troll or an extreme >>>> pedant >>>>> from a parallel experience. >>>>> I'm not sure how much communicating with it is educational. I >>>> understand >>>>> all the terms he's using but none of the meanings he >>>>> is ascribing to them. And calling you a pseudo intellectual for no >>>>> obvious reason strikes me as very troll-like not to mention >>>>> rude. >>>> His post missed the point of the article by focusing on the definition >>>> of a word. At some point, who cares what the word is, it's the concept >>>> that matters. >>> But words represent concepts... generally very specific ones. It's why >>> writing poetry is so darn hard. >> Actually its quite the reverse. In normal usage (insert your definition >> of normal here) words have several grey, slightly overlapping and fuzzy meanings. >> And that's ignoring the synonyms and sounds-a-likes. Its only when you try to >> write in a so called technical English that meanings get narrowed down and eve >> then it doesn't take much to find a confusing alternate meaning for them. As >> programmers we are uniquely blessed/cursed with 'words' that mean precisely one >> thing when passed to a specific compiler in a certain context. :-) >> >> Regards, >> >> Bruce. > > All true, but the keywords that are most controversial are ones that are overloaded to mean different things in different contexts. > > The best example is "enum". Walter correctly observes that, from a compiler designer's point of view, a list of enumerated values is the same as a "manifest constant", so he re-uses the keyword. To a programmer (or at least this progammer) the two things are conceptually different, used for different reasons. I find the usage confusing. > > This sort of thing is common when you put engineers in charge of the user interface. The aspects of the problem that are important to the implementation are paramount to the implementer and it's easy to lose sight of the fact that the user doesn't care. What's intuitive to the user is not what's intuitive to the designer. > > "Invariant" has a specific meaning to programmers with respect to contracts. "Invariant" as Walter uses it is the same, but different. It is illuminating that those who commented on Walter's article focussed on the keyword and not on the concept. It's the intuition of the designer not matching the intuition of the user again. > > I know we went round and round regarding this keyword and Walter's right -- at some point you just have to make a decision and go with it. But when there's so much complaint about the decision it may be time to reconsider. > > Paul > Although I think 'immutable' is preferable over 'invariant', I only think it's *slightly* preferable, and don't have much of a beef with 'invariant'. I would reckon much of the rest of the community also doesn't mind 'invariant'. The real beef was 'const', that a lot of people (myself included) thought it wasn't very adequate and other alternatives such as 'readonly' were preferred. But frankly, I cant' say this is an issue on the top list of things that I find troublesome in D. -- Bruno Medeiros - Software Developer, MSc. in CS/E graduate http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D