January 02, 2015
On Fri, Jan 02, 2015 at 10:55:21PM +0100, Andrej Mitrovic via Digitalmars-d wrote:
> On 1/2/15, Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> > (The reason dynamically typed languages are enduringly popular is that it is easier to write code in them. People are inherently lazy.)
> 
> Considering how much time one has to spend scratching their head what type of a variable something is in Python, I think the *true slackers* prefer statically typed languages. One hit of the compile button and if it works you're 99% done already. :)

Yeah, I think dynamically-typed languages lost a bit of their edge in terms of catering to programmer laziness when statically-typed languages started introducing type inference.


T

-- 
Don't modify spaghetti code unless you can eat the consequences.
January 02, 2015
On 1/2/2015 1:55 PM, Andrej Mitrovic via Digitalmars-d wrote:
> Considering how much time one has to spend scratching their head what
> type of a variable something is in Python, I think the *true slackers*
> prefer statically typed languages. One hit of the compile button and
> if it works you're 99% done already. :)


Yeah, but notice the growing popularity of 'auto'!
January 02, 2015
On 02/01/15 22:16, Walter Bright via Digitalmars-d wrote:
> I don't believe it is impossible to implement in D, in fact, Bartosz Milewski
> proposed such a system some years back. I do believe that people will simply
> reject such a system as too hard to use.

Isn't that dependent on the use-case, though?  We know very well that games programmers (for example) will jump through programming fire, compared to many other developers, in order to achieve their desired results.

Assuming that we're not going to lose the default case of the GC being responsible for allocation/ownership unless the programmer specifies otherwise, what's wrong with having a rigorous ownership system in place that can be made use of if and only if the programmer sees value in it?

> For a topical example, check out the threads here on the Ddoc syntax. Many have
> strongly argued against the simple, general, powerful and orthogonal macro
> syntax in favor of an idiosyncratic mass of special cases. It's classic.

OK, tongue in cheek time, but if simple, powerful and orthogonal is the goal, why are we messing around with this D stuff instead of just writing everything in Lisp? ;-)

I hope it's obvious what I'm getting at here -- a really simple, general and powerful syntax can become horrendously complicated to deal with once you start going beyond a certain scale of combinations.

January 02, 2015
On 1/2/2015 1:17 PM, Joseph Rushton Wakeling via Digitalmars-d wrote:
> How about a link at the top of the forum.dlang.org page saying something like,
> "Before posting, please read our _community guidelines_" ?  With the page linked
> to containing advice like the above.
>
> I know that there's always been a lot of pride that we've always been able to
> get along without some kind of code of conduct, but ... well, guidelines are not
> the same as a code, and anyway, not having guidance just doesn't scale in my
> experience.

I've been extremely reluctant to have any sort of official conduct code. I prefer a gentle nudge on a case by case basis, and just deleting the posts of incorrigible trolls.

Leading by example, implicit expectations of good conduct, and peer pressure can be amazingly effective.

A code of conduct that says things like "don't harass others, no illegal content, etc." are just pointless, patronizing and frankly insulting. If someone wants to behave badly, is a code of conduct really going to change their mind?

Caltech, which I attended, was very influential on me in that it is the only school in the world that has a real honor system. Nobody else has the guts to try it. I've had good success applying the principles of it ever since, and this forum is one of them.

Essentially, the default attitude is to trust that people are honest and decent. I don't tell them how to be honest and decent, I just assume that they are. It works amazingly well.

(At Caltech, for example, exams are not proctored by institute policy. You can even take time limited tests home with you and do them when you're ready. The number of Fs students get on exams is a pretty good indicator that when they're trusted, they rise to the occasion.)

I've noticed that the D community is an unusually honorable and decent group of people. Maybe that's due in some part to implicitly expecting them to be so, or maybe that's my own hubris. But I am extremely unwilling to risk that by posting a "code of conduct" that assumes people need lessons in how to behave.
January 02, 2015
> I've been extremely reluctant to have any sort of official conduct code. I prefer a gentle nudge on a case by case basis, and just deleting the posts of incorrigible trolls.
>
> Leading by example, implicit expectations of good conduct, and peer pressure can be amazingly effective.
>

Yes, we don't need official forum rules, but we have to agree on the unofficial ones. If people with d street cred step up and tell people if they go overboard everyone will follow. If they point to some official rules, those how break them will just argue that they technically didn't. We have no need for lawyers here.
January 02, 2015
On 1/2/15, Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On 1/2/2015 1:55 PM, Andrej Mitrovic via Digitalmars-d wrote:
>> Considering how much time one has to spend scratching their head what type of a variable something is in Python, I think the *true slackers* prefer statically typed languages. One hit of the compile button and if it works you're 99% done already. :)
>
>
> Yeah, but notice the growing popularity of 'auto'!
>

I used to use auto a lot in the past, and for some things I still do. But I've come to really appreciate code readability, there could be any number of people reading the code that I write in the future (including me!). Knowing at a glance what type some variable is makes it easier to understand code.

auto still kicks ass of course, especially for ranges and template code.
January 03, 2015
On 1/2/2015 3:17 PM, Andrej Mitrovic via Digitalmars-d wrote:
> auto still kicks ass of course, especially for ranges and template code.

Bluntly, auto makes those usable.
January 03, 2015
On 02/01/15 23:50, Walter Bright via Digitalmars-d wrote:
> I've been extremely reluctant to have any sort of official conduct code. I
> prefer a gentle nudge on a case by case basis, and just deleting the posts of
> incorrigible trolls.

Yes, I'm aware of that, and I do have a lot of sympathy with your point of view.

> Leading by example, implicit expectations of good conduct, and peer pressure can
> be amazingly effective.

All very true.

> A code of conduct that says things like "don't harass others, no illegal
> content, etc." are just pointless, patronizing and frankly insulting. If someone
> wants to behave badly, is a code of conduct really going to change their mind?

As regards the specific provisions you cite, sure, that stuff is almost always annoying and patronizing.  But I think that what I was proposing was slightly more subtle.

I do think there's a big difference between friendly guidelines, versus a "code of conduct".  The most obvious is that the former are intended to be helpful advice, not a list of expectations.

> Caltech, which I attended, was very influential on me in that it is the only
> school in the world that has a real honor system. Nobody else has the guts to
> try it. I've had good success applying the principles of it ever since, and this
> forum is one of them.
>
> Essentially, the default attitude is to trust that people are honest and decent.
> I don't tell them how to be honest and decent, I just assume that they are. It
> works amazingly well.

I agree.  However, I think that the ability to rely on an honour system does depend to a certain extent on the numbers of people you are dealing with.

One of the benefits of guidelines or codes of conduct is not so much in instructing people what to do, as much as in constraining the leadership or authority figures in an organization to behave fairly and consistently in acting against troublemakers.  This becomes quite apparent in some moderated forums where the "moderation" in practice amounts to "What ticks off the current moderator at this particular moment".  Such communities are rarely fun to be part of.

Obviously D does not have such a problem right now, but as the number of people active on the forums grows, there are inevitably going to be more and more instances of people behaving antisocially, and that does in turn make it more important to have some mechanism to ensure they are dealt with fairly and not arbitrarily.

There are also some particular personality traits that can lead people to have problems understanding how their behaviour is impacting on others -- obvious examples are people on some parts of the autistic spectrum or people who are experiencing mental health issues.  Firm guidelines can sometimes be helpful here in terms of defining clear boundaries that people can look to when they may not entirely trust their own judgement.  They can also be _very_ important in helping to ensure that other community members do not victimise someone who seems to be acting antisocially, but may in fact be experiencing issues that prevent them from realizing how they are coming across.

> I've noticed that the D community is an unusually honorable and decent group of
> people. Maybe that's due in some part to implicitly expecting them to be so, or
> maybe that's my own hubris. But I am extremely unwilling to risk that by posting
> a "code of conduct" that assumes people need lessons in how to behave.

If you think of it less as an attempt to tell people how to behave, and more of a sanity check for community leaders to think, "Hang on, am I right to call out this person for their behaviour?", then a code of conduct can make more sense. In the (hopefully rare) event that a community member does need to be dealt with firmly, it can also be helpful to have something consistent to point to to explain such decisions.

That said, I don't see any pressing need for something formal at this point in time.  Some friendly suggestions, guidelines or advice -- that's another thing and doesn't need to be provided in a formal way.
January 03, 2015
On 1/2/2015 2:38 PM, Joseph Rushton Wakeling via Digitalmars-d wrote:
> On 02/01/15 22:16, Walter Bright via Digitalmars-d wrote:
>> I don't believe it is impossible to implement in D, in fact, Bartosz Milewski
>> proposed such a system some years back. I do believe that people will simply
>> reject such a system as too hard to use.
>
> Isn't that dependent on the use-case, though?  We know very well that games
> programmers (for example) will jump through programming fire, compared to many
> other developers, in order to achieve their desired results.

Take a look at noted game developer Jonathan Blow's videos. They'll jump through hoops for performance, but I see little evidence they will do so for correctness. It's like have a nun stand over you and rap your knuckles every time your handwriting isn't perfect. Nobody likes that.


> Assuming that we're not going to lose the default case of the GC being
> responsible for allocation/ownership unless the programmer specifies otherwise,
> what's wrong with having a rigorous ownership system in place that can be made
> use of if and only if the programmer sees value in it?

Because of the viral nature of it, you cannot avoid it. It's like trying to avoid using const.


>> For a topical example, check out the threads here on the Ddoc syntax. Many have
>> strongly argued against the simple, general, powerful and orthogonal macro
>> syntax in favor of an idiosyncratic mass of special cases. It's classic.
>
> OK, tongue in cheek time, but if simple, powerful and orthogonal is the goal,
> why are we messing around with this D stuff instead of just writing everything
> in Lisp? ;-)

Exactly.


> I hope it's obvious what I'm getting at here -- a really simple, general and
> powerful syntax can become horrendously complicated to deal with once you start
> going beyond a certain scale of combinations.

Don't I know it :-)

January 03, 2015
On 1/3/15, Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On 1/2/2015 3:17 PM, Andrej Mitrovic via Digitalmars-d wrote:
>> auto still kicks ass of course, especially for ranges and template code.
>
> Bluntly, auto makes those usable.
>

Yeah it shouldn't be looked upon as a gimmick, it's an enabler feature.

And let's not forget auto return types! (which I dearly miss in D1).