Jump to page: 1 2 3
Thread overview
What is Invariant Good For?
Aug 01, 2008
Walter Bright
Aug 02, 2008
Bruce Adams
Aug 02, 2008
Jesse Phillips
Aug 02, 2008
Walter Bright
Aug 03, 2008
Sean Kelly
Aug 03, 2008
Walter Bright
Aug 03, 2008
Derek Parnell
Aug 03, 2008
Walter Bright
Aug 03, 2008
Manfred_Nowak
Aug 03, 2008
Walter Bright
Aug 03, 2008
Sean Kelly
Aug 03, 2008
Bruce Adams
Aug 03, 2008
Paul D. Anderson
Aug 04, 2008
Walter Bright
Aug 04, 2008
JMNorris
Aug 04, 2008
Russell Lewis
Aug 11, 2008
Bruno Medeiros
Aug 02, 2008
Peter C. Chapin
Aug 03, 2008
Knud Soerensen
Aug 03, 2008
Koroskin Denis
Aug 03, 2008
Knud Soerensen
Aug 05, 2008
Nick Sabalausky
Aug 04, 2008
Wyverex
August 01, 2008
http://www.reddit.com/r/programming/comments/6ui1q/d_what_is_invariant_good_for/
August 02, 2008
On Fri, 01 Aug 2008 20:52:26 +0100, Walter Bright <walter@nospamm-digitalmars.com> wrote:

> http://www.reddit.com/r/programming/comments/6ui1q/d_what_is_invariant_good_for/

I disagree with the suggestion that immutable is a better choice than invariant. To me, perhaps still wrongly
in a C++ mindset, mutable and immutable are in terms of the clients ability to modify the data whereas invariant
data is invariant in the normal sense because it implies a contract.
Namely that X(t+n) == X(t=0) for at least the duration of any function using X.

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.

Regards,

Bruce.
August 02, 2008
On Sat, 02 Aug 2008 11:42:32 +0100, Bruce Adams wrote:

> On Fri, 01 Aug 2008 20:52:26 +0100, Walter Bright <walter@nospamm-digitalmars.com> wrote:
> 
>> http://www.reddit.com/r/programming/comments/6ui1q/
d_what_is_invariant_good_for/
> 
> I disagree with the suggestion that immutable is a better choice than invariant. To me, perhaps still wrongly in a C++ mindset, mutable and immutable are in terms of the clients ability to modify the data whereas invariant data is invariant in the normal sense because it implies a contract. Namely that X(t+n) == X(t=0) for at least the duration of any function using X.
> 
> 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.
> 
> Regards,
> 
> Bruce.

I would like to agree with you here, on the mutable and 'dibblego' point.

Everything 'dibblego' says is done in a way that he uses many big words that he understands the meaning for, but fits them together in a way that is incorrect but sounds like it is an undeniable truth. I have only come across this such graceful tactic once before, the true trolls, Jerry Lee Cooper

http://jerryleecooper.com/ a fan blog of his great work.
August 02, 2008
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.
August 02, 2008
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
August 03, 2008
== Quote from Walter Bright (newshound1@digitalmars.com)'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.  But more to the point, what if this D program:

    void main()
    {
        void fn( int x )
        {
            writefln( x );
        }

        const int x = 5;
        void delegate() d = &fn;
        fn();
    }

Were this instead:

    blue main()
    {
        blue fn( fast x )
        {
            writefln( x );
        }

        querulous skinflint x = V;
        blue refrigerator() d = &fn;
        fn();
    }

Same concepts, same syntax, but could you convince anyone to use the language?


Sean
August 03, 2008
Sean Kelly wrote:
> Same concepts, same syntax, but could you convince anyone to use
> the language?

It's hard to find 3 people to agree on any one word for constant. I might as well have used "refrigerator" to mean invariant.
August 03, 2008
On Sat, 02 Aug 2008 19:00:41 -0700, Walter Bright wrote:

> Sean Kelly wrote:
>> Same concepts, same syntax, but could you convince anyone to use the language?
> 
> It's hard to find 3 people to agree on any one word for constant. I might as well have used "refrigerator" to mean invariant.

Isn't this also because we are trying to use simple words to express subtly different concepts. One concept is of something that, once it has been given a value, can *never* have that value changed during the life of the program, and another is that of something that cannot have its value changed in certain circumstances, such as by a specific function or during a specific period of time, etc ...

Simple words will never suffice, so we may as well use words which are approximately right and just learn to associated them with their exact meaning. Arguing over 'const' 'immutable', 'invariant', 'constant', 'constrained', 'fixed', 'final', 'hard', 'shell-encrusted-soft-core', ... is pretty much a waste of precious time. It really does not matter; just pick something, define it, and go with it.


-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
August 03, 2008
Derek Parnell wrote:
> Simple words will never suffice, so we may as well use words which are
> approximately right and just learn to associated them with their exact
> meaning. Arguing over 'const' 'immutable', 'invariant', 'constant',
> 'constrained', 'fixed', 'final', 'hard', 'shell-encrusted-soft-core', ...
> is pretty much a waste of precious time. It really does not matter; just
> pick something, define it, and go with it.


Exactly. The rest is arguing about the color of the bicycle shed.
August 03, 2008
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


-- 
http://crowdnews.eu - Promote yourself and your friends!
« First   ‹ Prev
1 2 3