May 29, 2014
On Wednesday, 28 May 2014 at 13:05:53 UTC, Craig Dillabaugh wrote:
>
> Whats wrong with "If you think that, you have another thing coming."?
>
> I've always understood it sort of like say your Father saying:
>
> "If you think that [i.e. you can steal your little brother's ice cream cone], then  you have another thing [i.e no ice cream, but maybe the leather strap] coming."

I think it depends on the context, "another thing coming" works with threats whereas "another think coming" works with civilized/intellectual disagreement.

Due to the popularity of "another thing coming" I probably would avoid using "think coming" lest it be interpreted as hostility.
May 29, 2014
On Wednesday, 28 May 2014 at 04:48:11 UTC, Jesse Phillips wrote:
> I did a translation of most of the code in the slides.
>
> http://dpaste.dzfl.pl/72b5cfcb72e4
>
> I'm planning to transform it into blog post (or series). Right now it just has some scratch notes. Feel free to let me know everything I got wrong.

Hoping someone can confirm or deny this thought.

    int x2prime = void; // (at global scope)

Since x2prime is module variable, I would expect that the compiler will always initialize this to 0 since there isn't really a performance hit. Or is using void guarantee it won't get initialized (so much value in that guarantee)?
May 29, 2014
On 28/05/2014 2:05 PM, Craig Dillabaugh wrote:
> On Tuesday, 27 May 2014 at 21:40:00 UTC, Walter Bright wrote:
>> On 5/27/2014 2:22 PM, w0rp wrote:
>>> I'm actually a native speaker of 25 years and I didn't get it at
>>> first. Natural
>>> language communicates ideas approximately.
>>
>> What bugs me is when people say:
>>
>>    I could care less.
>>
>> when they mean:
>>
>>    I couldn't care less.
>>
>>
>> and:
>>
>>    If you think that, you have another thing coming.
>>
>> when they mean:
>>
>>    If you think that, you have another think coming.
>
> Whats wrong with "If you think that, you have another thing coming."?
>
> I've always understood it sort of like say your Father saying:
>
> "If you think that [i.e. you can steal your little brother's ice cream
> cone], then  you have another thing [i.e no ice cream, but maybe the
> leather strap] coming."
>

I couldn't resist looking up this debate, and its quite a fiery one with no clear winner! There is no clear origin to the phrase and equal arguments for and against both forms.

My personal view is that the thinGists are right, because I often use the word believe in the first half, i.e. "if you believe that, then you have another thing coming." I wouldn't tell anyone that they had another belief coming, as in my experience my opinions have very little impact on the beliefs of others.

Also, grammatically speaking, if I was expecting someone to change their mind, I like to think that I'd more likely say that they had another thought coming, or "If you think that, then you have another thought to come." Not because think can never be a noun, I often say "lets have a think."

A...
May 29, 2014
On 2014-05-28 16:56, Jesse Phillips wrote:

> D doesn't have global scope. C++ does not do TLS but that isn't relevant
> to the no cost position that C++ is taking.

Since C++11 there's "thread_local".

-- 
/Jacob Carlborg
May 29, 2014
On Wednesday, 28 May 2014 at 05:40:26 UTC, Jesse Phillips wrote:
> When he explained why C++ inferred a const int type as int, he tripped me up because D does drop const for value types.

Hmm, this bit me (doesn't compile):
void f(in char[] s)
{
  auto s1=s;
  s1=s;
}
May 29, 2014
On Thursday, 29 May 2014 at 02:38:56 UTC, Jesse Phillips wrote:
> Hoping someone can confirm or deny this thought.
>
>     int x2prime = void; // (at global scope)
>
> Since x2prime is module variable, I would expect that the compiler will always initialize this to 0 since there isn't really a performance hit. Or is using void guarantee it won't get initialized (so much value in that guarantee)?

Depends on the implementation of tls, usually the .tls section is initialized data.
May 29, 2014
Jesse Phillips, el 29 de May a las 02:38 me escribiste:
> On Wednesday, 28 May 2014 at 04:48:11 UTC, Jesse Phillips wrote:
> >I did a translation of most of the code in the slides.
> >
> >http://dpaste.dzfl.pl/72b5cfcb72e4
> >
> >I'm planning to transform it into blog post (or series). Right now it just has some scratch notes. Feel free to let me know everything I got wrong.
> 
> Hoping someone can confirm or deny this thought.
> 
>     int x2prime = void; // (at global scope)
> 
> Since x2prime is module variable, I would expect that the compiler will always initialize this to 0 since there isn't really a performance hit. Or is using void guarantee it won't get initialized (so much value in that guarantee)?

global/static variables are placed in a special section in the executable. You need to put some value on it, so it is sensible to put the same value you use for initialization, but a compiler implementation could use a different value. I think void means "you don't know what the value is", not "is a random value" or "a value different from the default" (which is impossible for stack values, at least if the idea behind void is to avoid the extra runtime cost ;).

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
You should've seen her face. It was the exact same look my father gave
me when I told him I wanted to be a ventriloquist.
	-- George Constanza
May 29, 2014
On Wed, 28 May 2014 22:38:55 -0400, Jesse Phillips <Jesse.K.Phillips+D@gmail.com> wrote:

> On Wednesday, 28 May 2014 at 04:48:11 UTC, Jesse Phillips wrote:
>> I did a translation of most of the code in the slides.
>>
>> http://dpaste.dzfl.pl/72b5cfcb72e4
>>
>> I'm planning to transform it into blog post (or series). Right now it just has some scratch notes. Feel free to let me know everything I got wrong.
>
> Hoping someone can confirm or deny this thought.
>
>      int x2prime = void; // (at global scope)
>
> Since x2prime is module variable, I would expect that the compiler will always initialize this to 0 since there isn't really a performance hit. Or is using void guarantee it won't get initialized (so much value in that guarantee)?

IIRC, the entire section of global TLS data is initialized, and is all contiguous memory, so it would be anti-performant to initialize all but 4 bytes.

Note:

struct X
{
  int a;
  int b = void; // also initialized to 0.
}

This is because X must blit an init for a, and it would be silly to go through the trouble of blitting X.init to a, but not b. Especially, for instance, if you had an array of X (you'd have to blit every other int!)

-Steve
May 29, 2014
On Thu, 29 May 2014 04:57:14 -0400, Alix Pexton <alix.DOT.pexton@gmail.dot.com> wrote:

> On 28/05/2014 2:05 PM, Craig Dillabaugh wrote:
>> On Tuesday, 27 May 2014 at 21:40:00 UTC, Walter Bright wrote:
>>> On 5/27/2014 2:22 PM, w0rp wrote:
>>>> I'm actually a native speaker of 25 years and I didn't get it at
>>>> first. Natural
>>>> language communicates ideas approximately.
>>>
>>> What bugs me is when people say:
>>>
>>>    I could care less.
>>>
>>> when they mean:
>>>
>>>    I couldn't care less.
>>>
>>>
>>> and:
>>>
>>>    If you think that, you have another thing coming.
>>>
>>> when they mean:
>>>
>>>    If you think that, you have another think coming.
>>
>> Whats wrong with "If you think that, you have another thing coming."?
>>
>> I've always understood it sort of like say your Father saying:
>>
>> "If you think that [i.e. you can steal your little brother's ice cream
>> cone], then  you have another thing [i.e no ice cream, but maybe the
>> leather strap] coming."
>>
>
> I couldn't resist looking up this debate, and its quite a fiery one with no clear winner! There is no clear origin to the phrase and equal arguments for and against both forms.

If you think I'll let it go you're mad, you got another thing comin'

-Steve
May 29, 2014
On Thursday, 29 May 2014 at 13:11:52 UTC, Steven Schveighoffer wrote:
> IIRC, the entire section of global TLS data is initialized, and is all contiguous memory, so it would be anti-performant to initialize all but 4 bytes.

    int x2;
    float f2;

These are both TLS and they init to different values, I suppose:

    float f2prime = void;

would mean f2prime is 0 and not float.init. Otherwise what you state is kind of what I was expecting.

> Note:
>
> struct X
> {
>   int a;
>   int b = void; // also initialized to 0.
> }
>
> This is because X must blit an init for a, and it would be silly to go through the trouble of blitting X.init to a, but not b. Especially, for instance, if you had an array of X (you'd have to blit every other int!)
>
> -Steve

Thanks for the bonus example.