December 28, 2018
On Friday, 28 December 2018 at 12:51:33 UTC, SashaGreat wrote:
>
> By the way, thinking more about it, in C# (My main language), in could easily create a extension for this like:
>
> public static Format(string this, object[] args){
>     // Loop through all the {x} replacing with arg[x]
> }
>
> Then
>
> "x = {0}".Format(1);
>
> "x = {0}; y = {0}".Format(10, 20);
>
> Is this possible with D?
>
> S.

In D, UFCS does what C# extension methods do. If you have a function foo that takes a string argument first, you can either call it as foo(s, somethingsomething) or s.foo(somethingsomething).
December 28, 2018
On Friday, 28 December 2018 at 12:51:47 UTC, rikki cattermole wrote:
> On 29/12/2018 1:43 AM, SashaGreat wrote:
>> mixin("x = {0}; y = {1}", x, y);
>
> mixin("x = %d; y = %d;".format(8, 4));
>

For a more direct translation, you would use positional parameters.

mixin("x = %1$s; y = %2$s".format(x, y));


You can write your own function to pretty easily convert between the two string formats if you want. (Or, if going that far, you can just write your own function that avoids `format` and just converts the args and inserts at position.)

Though these positional things are different than the interpolation request.
December 28, 2018
On Friday, 28 December 2018 at 12:09:30 UTC, Walter Bright wrote:
> On 12/27/2018 9:55 PM, Michelle Long wrote:
>> This avoids having to do shit like
>
> Please don't use such words on the forums. We expect professional demeanor.

I'm sure you're bored of hearing this, but workplaces aren't very uniform in expected demeanor across different countries, industries, companies and jobs. Playing on stereotypes: what might be normal behaviour for a sysadmin at an Australian games company would likely be horrifically bad behaviour for a user-facing tech support role in a German accounting software company. Maybe I'm wrong, but I think programmers swearing regularly is pretty normal at work in a lot of places.

Maybe there is another description of what you intend that would be more universal.

(To be clear, I think I understand what you mean by "professional demeanor", but I've been here a while and inferred from observation what you do and don't put up with, plus I guess a bit based on similarities between UK and USA culture)
December 28, 2018
On Fri, 28 Dec 2018 04:09:30 -0800, Walter Bright wrote:
> On 12/27/2018 9:55 PM, Michelle Long wrote:
>> This avoids having to do shit like
> 
> Please don't use such words on the forums. We expect professional demeanor.

Based on enforcement, I'd say it's a rule against swearing specifically. At my job, I can say it's fucked up that swagger-codegen for Java produces broken JAX-RS code by default, but if I responded to a coworker missing something in documentation by sending them a link to the Wikipedia page for confirmation bias, that wouldn't be acceptable.

On the newsgroups, though, the opposite is true.
December 28, 2018
On Friday, 28 December 2018 at 17:47:41 UTC, Neia Neutuladh wrote:
> On Fri, 28 Dec 2018 04:09:30 -0800, Walter Bright wrote:
>> On 12/27/2018 9:55 PM, Michelle Long wrote:
>>> This avoids having to do shit like
>> 
>> Please don't use such words on the forums. We expect professional demeanor.
>
> Based on enforcement, I'd say it's a rule against swearing specifically. At my job, I can say it's fucked up that swagger-codegen for Java produces broken JAX-RS code by default, but if I responded to a coworker missing something in documentation by sending them a link to the Wikipedia page for confirmation bias, that wouldn't be acceptable.
>
> On the newsgroups, though, the opposite is true.

"No swearing" is a bright-line rule [1] that's easy to understand and to enforce. "No passive-aggressive Wikipedia links", on the other hand, requires a certain amount of subjective judgment, and as a result has more potential to lead to misunderstandings.

When you have a relatively small group of people who all know each other, misunderstandings aren't too difficult to resolve, but when you have a large group of people, many of whom are complete strangers to one another, it can become quite difficult. So it makes sense that a public newsgroup, which is more like the second kind of group, would favor simple, clear rules, at the expense of nuance.

[1] https://www.law.cornell.edu/wex/bright-line_rule
December 28, 2018
On Fri, 28 Dec 2018 18:39:40 +0000, Paul Backus wrote:
> "No swearing" is a bright-line rule [1] that's easy to understand and to enforce.

Yes. My primary complaint is that the rule is called "be professional" and is enforced as "don't swear".

> When you have a relatively small group of people who all know each other, misunderstandings aren't too difficult to resolve, but when you have a large group of people, many of whom are complete strangers to one another, it can become quite difficult.

Yes, maintaining a community is quite difficult.
December 28, 2018
On Friday, 28 December 2018 at 12:09:30 UTC, Walter Bright wrote:
> On 12/27/2018 9:55 PM, Michelle Long wrote:
>> This avoids having to do shit like
>
> Please don't use such words on the forums. We expect professional demeanor.

I always find it amusing when people are offended because a particular word is used. Not even in the context it was used, merely that the word was used. I can easily and effortlessly say something much less professional without the use of such curse words. Someone interjected about my use of curse words in public, I insulted them in another language, and they were none the wiser. It's just a word, the person that gives it meaning is you. If you want to interpret the word in a way it wasn't used then that's on you. I find it funny radio and tv all have to bleep out these words when I can literally go on youtube and effortlessly find a video where they say "fuck" every 5 seconds without so much as a "i am totally this age and it is not made up so I can view the video" button. Oh how times change.

tabarnak eh, monsieur Walter
December 29, 2018
On 29/12/2018 6:47 AM, Neia Neutuladh wrote:
> On Fri, 28 Dec 2018 04:09:30 -0800, Walter Bright wrote:
>> On 12/27/2018 9:55 PM, Michelle Long wrote:
>>> This avoids having to do shit like
>>
>> Please don't use such words on the forums. We expect professional
>> demeanor.
> 
> Based on enforcement, I'd say it's a rule against swearing specifically.
> At my job, I can say it's fucked up that swagger-codegen for Java produces
> broken JAX-RS code by default, but if I responded to a coworker missing
> something in documentation by sending them a link to the Wikipedia page
> for confirmation bias, that wouldn't be acceptable.
> 
> On the newsgroups, though, the opposite is true.

Its not specific to swearing. Your usage of the word "fucked" here is ok for example. You're not using it as an adjective. Just stating a context for which it has been used in.

We do badly at it, but a large point of the purpose of that rule is to stop aggressive tones and hateful discussion. With insults going back in forth. For this reason it works rather well.

Either way, this is getting rather off-topic.
December 29, 2018
On Friday, 28 December 2018 at 14:13:04 UTC, John Colvin wrote:
> On Friday, 28 December 2018 at 12:09:30 UTC, Walter Bright wrote:
>> On 12/27/2018 9:55 PM, Michelle Long wrote:
>>> This avoids having to do shit like
>>
>> Please don't use such words on the forums. We expect professional demeanor.
>
> I'm sure you're bored of hearing this, but workplaces aren't very uniform in expected demeanor across different countries, industries, companies and jobs. Playing on stereotypes: what might be normal behaviour for a sysadmin at an Australian games company would likely be horrifically bad behaviour for a user-facing tech support role in a German accounting software company. Maybe I'm wrong, but I think programmers swearing regularly is pretty normal at work in a lot of places.
>
> Maybe there is another description of what you intend that would be more universal.
>
> (To be clear, I think I understand what you mean by "professional demeanor", but I've been here a while and inferred from observation what you do and don't put up with, plus I guess a bit based on similarities between UK and USA culture)

This is just a guess but I think Walter is more sensitive to swearing because of his religious beliefs. I saw a video a while back that made me think he's Mormon. I was raised Mormon and they look down very much on swearing. Nowadays I just find it fun to use for emphasis and humor but I'm careful to only use it around people I know well and I know are comfortable with it. When I was Mormon I probably looked down on people who used it, so even though I don't think there's anything wrong with swearing, I know other people will judge you for it. With so many religious people in the world it's safe to assume someone's going to be offended by that language so it's best to avoid it if you want to Foster a well meaning and diverse community. Anyway, just thought I'd share my thoughts, could all be wrong but maybe it provides another helpful perspective.

December 29, 2018
On Sat, 29 Dec 2018 04:17:07 +0000, Michelle Long wrote:
> Basically it means black... but we can't use it because it's "offensive" because some psychopaths used it. People are morons. Most of the time they have no direct connection to the word but just perpetuate the problem.

Vocabulary is used, on occasion, to indicate allegiance. This is arbitrary, but so are flags, uniforms, armbands, and gestures, which are also used to indicate allegiance. In this case, the word is used to indicate allegiance to an ideal of racism.