Sharing in D

Steven Schveighoffer schveiguy at yahoo.com
Fri Aug 1 12:12:03 PDT 2008


"superdan" wrote
> Steven Schveighoffer Wrote:
>
>> "superdan" wrote
>> > but i still agree. sometimes you can know your shit without being
>> > published. you work for nasa, cia, or some secretive hedge fund. or you
>> > just don't like sharing shit. no problem. but without a track record 
>> > you
>> > must come with real good *factual* shit to be credible. not "i spend a 
>> > lot
>> > of time thinking about this shit". not what you believe. without a 
>> > proven
>> > track record nobody gives a shit on how you spend your nights or on 
>> > what
>> > you believe.
>>
>> What I meant by that is, I think possibly the only solution for
>> multithreadded issues is careful planning, training, and experience.  In
>> otherwords, my threading code works because I pay careful attention to 
>> the
>> threading details.  It might be impossible for a technical solution to 
>> exist
>> to prevent Joe Newb programmer from making threading mistakes.
>
> and you're implying that it can't be done any better. you know, if 
> everybody thought like you there'd be no progress.

I'm not saying that we shouldn't try.  I'm just saying it *might* be 
impossible.  I encourage Walter to solve it, but I can't see how this 
solution does it.

Look into NP-complete.  It's a set of problems that nobody can write a 
program to solve it (efficiently anyways).  First one I ever heard of is the 
traveling salesman problem:

http://en.wikipedia.org/wiki/Traveling_salesman_problem

>> > so as long as you stick to facts u should be in good shape. if you come
>> > with "my opinion is" shit then you should understand nobody will give a
>> > shit. in fact they will give a negative shit because that further fucks
>> > your credibility.
>>
>> You don't have to believe me.  Nobody has to believe me.  The fact that I
>> stated my opinion is good enough for me.  If I turn out to be right, then
>> people might listen to me next time.  If I turn out to be wrong, then it
>> still won't stop me from stating my opinion on the next issue.
>
> doesn't work that way dewd. it's like crying wolf whenever you feel it in 
> your urine. open the cabbage patches. then the mind. then the piehole. 
> that's how it works.
>
> i read this thread stuff yesterday a few times. my first reaction was it's 
> useless. second reaction was it's restrictive as shit. third read i 
> thought they might be up to something. and it was the interaction with 
> invariant that brought it all home for me. most importantly i didn't shout 
> my piehole around after the first read.

I admit that I already knew this shared/unshared was coming :)  So I already 
had thought about it over a month ago, but I wasn't allowed to talk about it 
on the NG.  But I'm a little disappointed that it's no different than the 
version I saw before...

Bottom line, I did think about it before posting.  Quite a bit.

>
>>  Mind, I
>> can't say anything about facts because I don't have any.  I'm very 
>> careful
>> to state things in terms of what "I think", and "my opinion".  I don't 
>> have
>> any more facts than Walter and company to know whether this concept will 
>> be
>> useful.  All I can say is what I think might happen (as is all Walter can
>> say too).  If it turns out to be the best thing since transitive const, 
>> then
>> I'm all for it.  Remember that Walter and company had several iterations
>> before they got that right.  I think that will probably be the case here
>> too.
>
> my point is you (and me too) have less facts, less experience, less 
> smarts, and less intuition than walt & co. if we tell them about a 
> mistake, fine. but if we go with "i feel shit" that's not progress.

Hey, don't listen to me.  Nobody has to do what I say based on a feeling. 
But I'm sure as hell not going to accept that if Walter feels good about it, 
it must be right, any more than you won't accept what I say because I don't 
feel good about it.  I need proof.  And the burden of proof is on Walter. 
I've already written multithreadded programs with the current D system, and 
they work.  You need to convince me that this new way will work more than 
just "Trust me, you'll be better off".

>
> it's good you compare with the const shit. that's the most fucking awesome 
> thing about d2. if you asked me before i would've told you nobody can pull 
> that shit and live. more over. walt has got a shitstorm the size of 
> fucking china when he got it wrong. if i were walt i would've given up. 
> but that's why walt is walt he kept at it and pushed the shit through. 
> what pisses me off is that to this day people still bitch about const 
> while refusing to actually understand it. it's not even hard. first 
> understand. then bitch.

I am one of those that fully understands the const system, and I still think 
it is missing some pieces :)  Every proposal I've made to fill in those 
pieces on the NG and to Andrei directly ultimately results in a response 
like "yes that looks like a sound idea, and would work, but we *feel* that 
it would make people like const less, so we're not going to implement it." 
I love a lot of what Walter and Andrei have done, but when ideas are shot 
down due to a perception of what might happen in the future, it seems to be 
based a lot less on fact than I would like.

-Steve 





More information about the Digitalmars-d mailing list