Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
February 14, 2014 Better C++? | ||||
---|---|---|---|---|
| ||||
Is that not just C+++? When the gc and allocation gets fixed we'll end up with C++++? Then don't we have D = C^n for some n? Does this hold for negative numbers? Complex numbers? |
February 14, 2014 Re: Better C++? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frustrated | On Fri, Feb 14, 2014 at 07:28:33PM +0000, Frustrated wrote: > Is that not just C+++? When the gc and allocation gets fixed we'll end up with C++++? > > Then don't we have D = C^n for some n? Does this hold for negative numbers? Complex numbers? I have enough trouble imagining C^n for irrational n, nevermind negative numbers or complex numbers! T -- Some ideas are so stupid that only intellectuals could believe them. -- George Orwell |
February 14, 2014 Re: Better C++? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frustrated | On Fri, 14 Feb 2014 14:28:33 -0500, Frustrated <c1514843@drdrb.com> wrote:
> Is that not just C+++? When the gc and allocation gets fixed
> we'll end up with C++++?
No, C+++ isn't valid, and I don't know about C++++, but I'm suspecting no.
The next generation would be C+=2
:P
-Steve
|
February 14, 2014 Re: Better C++? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Friday, 14 February 2014 at 20:11:19 UTC, Steven Schveighoffer
wrote:
> On Fri, 14 Feb 2014 14:28:33 -0500, Frustrated <c1514843@drdrb.com> wrote:
>
>> Is that not just C+++? When the gc and allocation gets fixed
>> we'll end up with C++++?
>
> No, C+++ isn't valid, and I don't know about C++++, but I'm suspecting no.
>
> The next generation would be C+=2
>
> :P
>
> -Steve
(++C)++
It looks silly, but it's valid in D!
|
February 14, 2014 Re: Better C++? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jeremy DeHaan | On Fri, 14 Feb 2014 15:23:50 -0500, Jeremy DeHaan <dehaan.jeremiah@gmail.com> wrote:
> On Friday, 14 February 2014 at 20:11:19 UTC, Steven Schveighoffer
> wrote:
>> On Fri, 14 Feb 2014 14:28:33 -0500, Frustrated <c1514843@drdrb.com> wrote:
>>
>>> Is that not just C+++? When the gc and allocation gets fixed
>>> we'll end up with C++++?
>>
>> No, C+++ isn't valid, and I don't know about C++++, but I'm suspecting no.
>>
>> The next generation would be C+=2
>>
>> :P
>>
>> -Steve
>
> (++C)++
>
> It looks silly, but it's valid in D!
Maybe valid, but what message is it sending?! C+=2 is much more efficient ;)
-Steve
|
February 14, 2014 Re: Better C++? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Friday, 14 February 2014 at 20:26:02 UTC, Steven Schveighoffer
wrote:
> On Fri, 14 Feb 2014 15:23:50 -0500, Jeremy DeHaan <dehaan.jeremiah@gmail.com> wrote:
>
>> On Friday, 14 February 2014 at 20:11:19 UTC, Steven Schveighoffer
>> wrote:
>>> On Fri, 14 Feb 2014 14:28:33 -0500, Frustrated <c1514843@drdrb.com> wrote:
>>>
>>>> Is that not just C+++? When the gc and allocation gets fixed
>>>> we'll end up with C++++?
>>>
>>> No, C+++ isn't valid, and I don't know about C++++, but I'm suspecting no.
>>>
>>> The next generation would be C+=2
>>>
>>> :P
>>>
>>> -Steve
>>
>> (++C)++
>>
>> It looks silly, but it's valid in D!
>
> Maybe valid, but what message is it sending?! C+=2 is much more efficient ;)
>
> -Steve
My original idea was to be (C++)++, which makes sense
conceptually, but wasn't valid code. :P
|
February 14, 2014 Re: Better C++? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jeremy DeHaan | On Fri, 14 Feb 2014 15:27:46 -0500, Jeremy DeHaan <dehaan.jeremiah@gmail.com> wrote:
> My original idea was to be (C++)++, which makes sense
> conceptually, but wasn't valid code. :P
Actually, it doesn't make sense. C++ increments C, but returns the value that C was before the increment. So it returns a temporary. Incrementing a temporary is not allowed (where would the incremented value go?), and even if it were allowed, would likely not be what you want ;)
++++C may be valid, but is butt-ugly.
C+=2 is just far superior on all fronts!
-Steve
|
February 14, 2014 Re: Better C++? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frustrated | On Friday, 14 February 2014 at 19:28:34 UTC, Frustrated wrote:
> Is that not just C+++? When the gc and allocation gets fixed
> we'll end up with C++++?
>
> Then don't we have D = C^n for some n? Does this hold for
> negative numbers? Complex numbers?
I don't what number n would be but the n for C++++ give C#... we need a number positive greater than this. :)
|
Copyright © 1999-2021 by the D Language Foundation