Thread overview | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 30, 2005 Vote: No - I would NOT like to see "immutable" in D | ||||
---|---|---|---|---|
| ||||
If you would NOT like to see the concept of immutable data in D (as discussed in other threads) - or you think that it would be a waste of Walter's time, please simply reply to this message directly. Please do not discuss anything in this thread. I would like that people issue their vote by replying, hence only reply once. In this way the votes should be very easy to count. If you would like to see D have the concept of immutable data, please vote in the "Vote: Yes" thread. Walter - if I have overstepped the purpose of the newsgroup with these posts, please delete them or make a posting that people not vote. Thanks Brad |
June 30, 2005 Re: No - I would NOT like to see "immutable" in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Beveridge | "Brad Beveridge" <brad@somewhere.net> wrote in message news:da1bd0$1iki$1@digitaldaemon.com... > If you would NOT like to see the concept of immutable data in D (as > discussed in other threads) - or you think that it would be a waste of > Walter's time, please simply reply to this message directly. Please do > not discuss anything in this thread. I would like that people issue their > vote by replying, hence only reply once. > In this way the votes should be very easy to count. > > If you would like to see D have the concept of immutable data, please vote in the "Vote: Yes" thread. > > Walter - if I have overstepped the purpose of the newsgroup with these posts, please delete them or make a posting that people not vote. > > Thanks > Brad No* (*) I'd like to see a warning for possible COW violations. |
June 30, 2005 Re: Vote: No - I would NOT like to see "immutable" in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Beveridge | No.
Complexity added outweighs tiny benefits.
Brad Beveridge wrote:
> If you would NOT like to see the concept of immutable data in D (as discussed in other threads) - or you think that it would be a waste of Walter's time, please simply reply to this message directly. Please do not discuss anything in this thread. I would like that people issue their vote by replying, hence only reply once.
> In this way the votes should be very easy to count.
>
> If you would like to see D have the concept of immutable data, please vote in the "Vote: Yes" thread.
>
> Walter - if I have overstepped the purpose of the newsgroup with these posts, please delete them or make a posting that people not vote.
>
> Thanks
> Brad
|
June 30, 2005 Re: No - I would NOT like to see "immutable" in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Beveridge | Nah. What David said. "Brad Beveridge" <brad@somewhere.net> wrote in message news:da1bd0$1iki$1@digitaldaemon.com... > If you would NOT like to see the concept of immutable data in D (as > discussed in other threads) - or you think that it would be a waste of > Walter's time, please simply reply to this message directly. Please do > not discuss anything in this thread. I would like that people issue > their vote by replying, hence only reply once. > In this way the votes should be very easy to count. > > If you would like to see D have the concept of immutable data, please vote in the "Vote: Yes" thread. > > Walter - if I have overstepped the purpose of the newsgroup with these posts, please delete them or make a posting that people not vote. > > Thanks > Brad |
July 01, 2005 Re: Vote: No - I would NOT like to see "immutable" in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Beveridge | No |
July 01, 2005 Re: Vote: No - I would NOT like to see "immutable" in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Medlock | "David Medlock" <noone@nowhere.com> wrote in message news:da1qe5$2719$1@digitaldaemon.com... > No. > > Complexity added outweighs tiny benefits. complexity.... What do you mean by that? Just curious. PS: I don't know any other compileable language in active use which does not have concept of immutable references. In one or another form. |
July 01, 2005 Re: Vote: No - I would NOT like to see "immutable" in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Fedoniouk | Andrew Fedoniouk wrote:
> "David Medlock" <noone@nowhere.com> wrote in message news:da1qe5$2719$1@digitaldaemon.com...
>
>>No.
>>
>>Complexity added outweighs tiny benefits.
>
>
> complexity....
> What do you mean by that?
> Just curious.
>
I mean it adds complexity to the compiler, as well as to the programmer and provides very minimal benefit, if any.
I have done quite a bit of C++ and I can never point to a situation where I said, 'thank heavens for const'.
Const can be casted away so its not a security mechanism.
It is value based so its not memory protection. (I can still modify a member of a pointer to const object)
Getting const-correctness in C++ is basically to ensure that something isn't delete'd before it should be(or if it can't be). Especially with C++ auto-casting operator overloading (call delete on a object, which assumes you wish to cast to pointer, boom).
I believe that garbage collection is superior to this.
-DavidM
> PS: I don't know any other compileable language
> in active use which does not have concept
> of immutable references. In one or another form.
Fine but what capability is missing from D which requires us to add it?
Just because others have it is not a valid reason, imo.
|
July 01, 2005 C++ const and lifetime protection | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Medlock | (Subject changed to prevent misinterpretation as vote) In article <da3ahh$rpv$1@digitaldaemon.com>, David Medlock says... > >Getting const-correctness in C++ is basically to ensure that something isn't delete'd before it should be(or if it can't be). Huh? Deleting a const pointer is perfectly legal in C++. Try it: int const * const p = new int(123); delete p; Am I misunderstanding your point? cheers Mike |
July 01, 2005 Re: C++ const and lifetime protection | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Capp | Mike Capp wrote:
> (Subject changed to prevent misinterpretation as vote)
>
> In article <da3ahh$rpv$1@digitaldaemon.com>, David Medlock says...
>
>>Getting const-correctness in C++ is basically to ensure that something isn't delete'd before it should be(or if it can't be).
>
>
> Huh? Deleting a const pointer is perfectly legal in C++. Try it:
>
> int const * const p = new int(123);
> delete p;
>
> Am I misunderstanding your point?
>
> cheers
> Mike
>
>
Oops.
I was thinking of const return values, which must be deposited into const variables. As you say though, there isn't anything protecting the variable's contents.
|
July 01, 2005 Re: Vote: No - I would NOT like to see "immutable" in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Medlock | "David Medlock" <noone@nowhere.com> wrote in message news:da3ahh$rpv$1@digitaldaemon.com... > Andrew Fedoniouk wrote: >> "David Medlock" <noone@nowhere.com> wrote in message news:da1qe5$2719$1@digitaldaemon.com... >> >>>No. >>> >>>Complexity added outweighs tiny benefits. >> >> >> complexity.... >> What do you mean by that? >> Just curious. >> > I mean it adds complexity to the compiler, as well as to the programmer and provides very minimal benefit, if any. > > I have done quite a bit of C++ and I can never point to a situation where I said, 'thank heavens for const'. The problem is in this "I". If you will coordinate a team of 8 developers spreaded from Asia Far East to Canada West you *will* say 'thank heavens for const' and any other public/private/package/etc attributes. I am personally can live without const and public/private/package/etc in the toy language and project. But in real life and in real projects - beg my pardon. > > Const can be casted away so its not a security mechanism. > > It is value based so its not memory protection. (I can still modify a member of a pointer to const object) > > Getting const-correctness in C++ is basically to ensure that something isn't delete'd before it should be(or if it can't be). Especially with C++ auto-casting operator overloading (call delete on a object, which assumes you wish to cast to pointer, boom). > > I believe that garbage collection is superior to this. > > -DavidM > > > PS: I don't know any other compileable language > > in active use which does not have concept > > of immutable references. In one or another form. > > Fine but what capability is missing from D which requires us to add it? Just because others have it is not a valid reason, imo. |
Copyright © 1999-2021 by the D Language Foundation