October 16, 2010
On 10/15/10 19:18 CDT, Justin Johansson wrote:
> On 16/10/2010 9:34 AM, Andrei Alexandrescu wrote:
>> On 10/15/10 17:34 CDT, Andrei Alexandrescu wrote:
>>> On 10/15/10 16:25 CDT, Nick Sabalausky wrote:
>>>> I just hope they get serious enough about functional programming to
>>>> gain
>>>> some monads to go along with their "goroutines".
>>>
>>> They should call them "gonads".
>>>
>>> Andrei
>>
>> Wait, that was your actual joke. Sighhhh...
>>
>> Andrei
>
> Coincidentally, the official mailing list for Go PL
> is known as go-nuts! :-)

Speaking of which, I gave one more read this morning to the reddit discussion (http://www.reddit.com/r/programming/comments/dr6r4/talk_by_rob_pike_the_expressiveness_of_go_pdf/). Boy, that didn't Go well.

Andrei
October 16, 2010
On 10/15/2010 08:34 PM, Walter Bright wrote:
> Max Samukha wrote:

> I don't see why. They're useful enough.

I might have exaggerated. But, for example, this use case:

struct S
{
   int x, y, z;
}

ref S foo();
void bar(ref S s);

void baz()
{
    auto s = &foo();
    s.x = 1;
    s.y = 2;
    s.z = 3;
    bar(*s);
}

will not be easy. One will have to use tricks like that unsafe Ref struct or to move the code accessing the referenced object to another function. Pretty awkward.

>
>
>> What I like about Go's solution is that it is consistent with
>> closures. When a group of locals escape with a closure (that is when
>> the address of the local function using that group is taken) they are
>> copied to heap. When a local escape by ref (that is when the address
>> of the local is taken), it is also copied to heap.
>
> I understand how it works.

Of course, you do!

> There is a downside to it, though. In D2,
> closures get copied to the GC heap if there is a possibility of an
> escaping reference. A lot of people complain about this being unexpected
> hidden overhead.

Yeah, I don't like these hidden allocations either.

>
> The trouble with "copy any ref'd local to the heap" automatically
> happening is the biggest advantage of passing by ref (efficiency) is
> automatically lost. Even if it does not escape, it is copied to the heap
> anyway, as you point out below.

Indeed. Why create a stack-allocated local if it is going to be copied to the heap anyway?

>
>
>> What I don't like about Go's closures/addresses-to-locals and D's
>> delegates is that stuff is heap-allocated implicitly and by default.
>> Go has even gone (sorry) as far as allocating copies *every* time the
>> address of a local is taken.
>
> Exactly. (Though D won't do the copy if it can prove that the delegate
> does not escape.)
>
>
>> That reminds me of the argument about "new" being necessary for
>> classes because it makes the heap allocation explicit. It is difficult
>> to say good-bye to "new" but at the same time we are somehow happy
>> with implicitly allocated closures.
>
> I think that implicitly allocated closures are a lot less common than
> passing a local by reference.

I have no idea how often closures are used. I use them rarely but some people do crazy things with them.

October 16, 2010
Walter Bright wrote:
> Nick Sabalausky wrote:
>> Seems a bad idea to force the overhead of that, but it should definitely be available as an option. Contrary to what Walter and Andrei seem to think, 32-bit systems are still very much alive and will be for quite awhile longer. Especially when you remember that there are more computers out there than just desktops and servers. (Ex: When is a phone ever going to need 64-bit? Eventually maybe, but certainly not anytime soon.)
> 
> 16 bit processors died around 15 years after the introduction of 32 bit ones, even for embedded systems. If history repeats itself, figure 32 bit ones have about 5 years to go!
> 
	Funny thing is we still use some 8-bit microcontrollers in some
situations :) But you're right, as soon as we need something more we
go directly to 32 bits without stopping in the 16 bits square.

		Jerome
-- 
mailto:jeberger@free.fr
http://jeberger.free.fr
Jabber: jeberger@jabber.fr



October 16, 2010
On 10/15/2010 11:26 PM, Nick Sabalausky wrote:
> "Andrei Alexandrescu"<SeeWebsiteForEmail@erdani.org>  wrote in message
> news:i9akvf$1jlq$3@digitalmars.com...
>> On 10/15/10 17:34 CDT, Andrei Alexandrescu wrote:
>>> On 10/15/10 16:25 CDT, Nick Sabalausky wrote:
>>>> I just hope they get serious enough about functional programming to gain
>>>> some monads to go along with their "goroutines".
>>>
>>> They should call them "gonads".
>>>
>>> Andrei
>>
>> Wait, that was your actual joke. Sighhhh...
>>
>
> Well it was a bit opaque. I was actually wondering if anyone would make the
> connection at all. :)

Much obliged to play Captain Obvious' role.

Andrei
October 16, 2010
Jérôme M. Berger wrote:
> Walter Bright wrote:
>> Nick Sabalausky wrote:
>>> Seems a bad idea to force the overhead of that, but it should
>>> definitely be available as an option. Contrary to what Walter and
>>> Andrei seem to think, 32-bit systems are still very much alive and
>>> will be for quite awhile longer. Especially when you remember that
>>> there are more computers out there than just desktops and servers.
>>> (Ex: When is a phone ever going to need 64-bit? Eventually maybe, but
>>> certainly not anytime soon.)
>> 16 bit processors died around 15 years after the introduction of 32 bit
>> ones, even for embedded systems. If history repeats itself, figure 32
>> bit ones have about 5 years to go!
>>
> 	Funny thing is we still use some 8-bit microcontrollers in some
> situations :) But you're right, as soon as we need something more we
> go directly to 32 bits without stopping in the 16 bits square.

I can tell 16 bits is dead as a doornail because the 16 bit tools biz has dried up to nothing.
November 11, 2010
On 16/10/2010 00:15, Walter Bright wrote:
> Andrei Alexandrescu wrote:
>> On 10/15/10 17:34 CDT, Andrei Alexandrescu wrote:
>>> On 10/15/10 16:25 CDT, Nick Sabalausky wrote:
>>>> I just hope they get serious enough about functional programming to
>>>> gain
>>>> some monads to go along with their "goroutines".
>>>
>>> They should call them "gonads".
>>>
>>> Andrei
>>
>> Wait, that was your actual joke. Sighhhh...
>
> I see we should invite JokeExplainer to the forums!

I didn't get it... :/
(Nick's joke that is)

-- 
Bruno Medeiros - Software Engineer
November 11, 2010
On 11/11/10 22:56, Bruno Medeiros wrote:
> On 16/10/2010 00:15, Walter Bright wrote:
>> Andrei Alexandrescu wrote:
>>> On 10/15/10 17:34 CDT, Andrei Alexandrescu wrote:
>>>> On 10/15/10 16:25 CDT, Nick Sabalausky wrote:
>>>>> I just hope they get serious enough about functional programming to
>>>>> gain
>>>>> some monads to go along with their "goroutines".
>>>>
>>>> They should call them "gonads".
>>>>
>>>> Andrei
>>>
>>> Wait, that was your actual joke. Sighhhh...
>>
>> I see we should invite JokeExplainer to the forums!
>
> I didn't get it... :/
> (Nick's joke that is)
>

Hi Bruno,

It is an English language word play on sound-alike words.

Google on: "define: gonads"

I think Nick was suggesting that someone/something gets some "balls" though "ovaries" might not be out of the question also. :-)

Trusting this explains well in your native language.

Regards,
Justin
November 11, 2010
Addendum: Too be sure, I think I forgot to say "monads" sounds like "gonads".


> Hi Bruno,
>
> It is an English language word play on sound-alike words.
>
> Google on: "define: gonads"
>
> I think Nick was suggesting that someone/something gets some "balls"
> though "ovaries" might not be out of the question also. :-)
>
> Trusting this explains well in your native language.
>
> Regards,
> Justin

November 12, 2010
On 11/11/2010 12:10, Justin Johansson wrote:
> On 11/11/10 22:56, Bruno Medeiros wrote:
>> On 16/10/2010 00:15, Walter Bright wrote:
>>> Andrei Alexandrescu wrote:
>>>> On 10/15/10 17:34 CDT, Andrei Alexandrescu wrote:
>>>>> On 10/15/10 16:25 CDT, Nick Sabalausky wrote:
>>>>>> I just hope they get serious enough about functional programming to
>>>>>> gain
>>>>>> some monads to go along with their "goroutines".
>>>>>
>>>>> They should call them "gonads".
>>>>>
>>>>> Andrei
>>>>
>>>> Wait, that was your actual joke. Sighhhh...
>>>
>>> I see we should invite JokeExplainer to the forums!
>>
>> I didn't get it... :/
>> (Nick's joke that is)
>>
>
> Hi Bruno,
>
> It is an English language word play on sound-alike words.
>
> Google on: "define: gonads"
>
> I think Nick was suggesting that someone/something gets some "balls"
> though "ovaries" might not be out of the question also. :-)
>
> Trusting this explains well in your native language.
>
> Regards,
> Justin

So Nick already had "gonads" in mind on that post, is that the case?

-- 
Bruno Medeiros - Software Engineer
November 24, 2010
"Bruno Medeiros" <brunodomedeiros+spam@com.gmail> wrote in message news:ibjd5l$2pv$1@digitalmars.com...
> On 11/11/2010 12:10, Justin Johansson wrote:
>> On 11/11/10 22:56, Bruno Medeiros wrote:
>>> On 16/10/2010 00:15, Walter Bright wrote:
>>>> Andrei Alexandrescu wrote:
>>>>> On 10/15/10 17:34 CDT, Andrei Alexandrescu wrote:
>>>>>> On 10/15/10 16:25 CDT, Nick Sabalausky wrote:
>>>>>>> I just hope they get serious enough about functional programming to
>>>>>>> gain
>>>>>>> some monads to go along with their "goroutines".
>>>>>>
>>>>>> They should call them "gonads".
>>>>>>
>>>>>> Andrei
>>>>>
>>>>> Wait, that was your actual joke. Sighhhh...
>>>>
>>>> I see we should invite JokeExplainer to the forums!
>>>
>>> I didn't get it... :/
>>> (Nick's joke that is)
>>>
>>
>> Hi Bruno,
>>
>> It is an English language word play on sound-alike words.
>>
>> Google on: "define: gonads"
>>
>> I think Nick was suggesting that someone/something gets some "balls" though "ovaries" might not be out of the question also. :-)
>>
>> Trusting this explains well in your native language.
>>
>> Regards,
>> Justin
>
> So Nick already had "gonads" in mind on that post, is that the case?
>

My intended joke:

Google Go has "coroutines" that it calls "goroutines" ( Because "go" + "coroutines" == "goroutines"). So I applied the same cutesy naming to "monads": "go" + "monads" == "gonads". And like Justin said, "gonads" also means "testicles" (and sometimes "ovaries"), so it's a pun and a rather odd name for a programming language feature.

And somewhat ironically, it *would* take some serious gonads to name a language feature "gonads". (In English, saying that something requires balls/gonads/nuts/etc is a common slang way of saying it requires courage.)