November 10, 2017
On Friday, 10 November 2017 at 12:42:55 UTC, Satoshi wrote:
> You didn't say anything negative about MSFT you just start making jokes about it.

ok. note taken. no jokes about msft allowed on D forums.

got it.

thanks for your input Satoshi.

November 10, 2017
On Friday, 10 November 2017 at 12:42:55 UTC, Satoshi wrote:
> 99% of Windows users couldn't find how to do basic stuff in Linux ..

yeah.. imagine if I had said that...all hell would have broken loose.

November 10, 2017
On Friday, 10 November 2017 at 12:42:55 UTC, Satoshi wrote:
> You didn't say anything negative about MSFT you just start making jokes about it.
> Then get rect and start crying and saying you did not troll.
> I'm not MSFT fanboy, I just find some of the C# features useful, nothing more.
>

So making a joke about MSFT excuses you and others to start bashing on me?

Really. That is more of a joke.
November 10, 2017
On Friday, 10 November 2017 at 12:51:04 UTC, codephantom wrote:
> So making a joke about MSFT excuses you and others to start bashing on me?
>
> Really. That is more of a joke.

ohh..anyone don't know what MSFT fanboy is?

https://www.urbandictionary.com/define.php?term=Microsoft%20Fanboy

November 10, 2017
On Friday, 10 November 2017 at 10:51:28 UTC, Jonathan M Davis wrote:
> Based on other posts that you've made, you seem interested in bashing anything related to Windows or Microsoft, and that really isn't productive when we're trying to have a technical discussion.
>
> - Jonathan M Davis

And I see you conveniently don't mention, that I posted on several discussion, that Windows XP is one of my favourite all time operating systems (yeah..made by Microsoft did you know?).

And I see you conveniently don't mention, that I posted that I run Windows Mobile on my phone.

That's why the only conclusions I can come to, is that MSFT fanboys runs these forums.

FORUM RULE 1: Do NOT make a joke about MSFT.
FORUM RULE 2: See rule 1.

I could go on all night about pathetic the response was, to me making a joke, but I have more intesting thing to atttend to now. Happy to take it up again if necessary.
November 10, 2017
On Friday, 10 November 2017 at 12:48:53 UTC, codephantom wrote:
> On Friday, 10 November 2017 at 12:42:55 UTC, Satoshi wrote:
>> 99% of Windows users couldn't find how to do basic stuff in Linux ..
>
> yeah.. imagine if I had said that...all hell would have broken loose.

And 99% of Linux users don't know what the word convenience and user-friendly mean.
November 10, 2017
On Friday, 10 November 2017 at 05:23:53 UTC, Adam Wilson wrote:
> On 11/6/17 12:20, Michael wrote:
>>[...]
>
> You're right, I didn't, that was intentional, because sometimes people write things like that. And it took a while for anyone to say anything about it. That is my point.
>
> But that's the thing. The ?? is significantly more obvious in the condensed version.
>
> This is something that a UX designer would recognize instantly, but human factors are very definitely not our strong skill as engineers. FWIW, my human factors experience comes from the deep study of airline crashes that I do as a pilot.
>
>>[...]
>
> Two things. ?: is ALSO a change a to language (lexer+parser). As to the whole "it's no more likely to typo the colon than the question" argument, sure, but that depends on the keyboard layout more than anything else, what works for you may not work elsewhere. And in either case, it's an easy compiler error. So you don't win anything with the ?:, but you win readability with the ??. MSFT spends a LOT of time studying these things. It would be wise to learn for free from the money they spent.

This is fair, though do we know Microsoft actually put research into their choice on this matter? Either way, it would be a nice addition, and my preference is for ?: but I'm sure the best case will win the others over.
November 10, 2017
On Friday, 10 November 2017 at 05:23:53 UTC, Adam Wilson wrote:
> On 11/6/17 12:20, Michael wrote:
>> I can't quite see why this proposal is such a big deal to people - as
>> has been restated, it's just a quick change in the parser for a slight
>> contraction in the code, and nothing language-breaking, it's not a big
>> change to the language at all.
>>
>> On Monday, 6 November 2017 at 19:13:59 UTC, Adam Wilson wrote:
>>> I am all for the Elvis operator, however I have two reservations about
>>> it. The first is that I don't see much use for it without a
>>> null-conditional. The second is that the current proposed syntax ?: is
>>> MUCH to easily confused with ?.
>>>
>>> This is not easy to read: obj1?.obj2?.prop3?:constant.
>>>
>>> When designing syntax sugar, ergonomics are very important, otherwise
>>> people won't use it. Microsoft spent a LOT of time and treasure to
>>> learn these lessons for us. I see no reason to ignore them just
>>> because "we don't like Microsoft"
>>>
>>> My proposal would be to copy what MSFT did, expect that I would I
>>> would introduce both operators at the same time.
>>>
>>> Syntax as follows: obj1?.obj2?.prop3 ?? constant
>>>
>>> In practice I don't see much use of the idiom outside of null's. The
>>> ONLY other thing that would work there is a boolean field and you
>>> might as well just return the boolean itself because the return values
>>> have to match types.
>>
>> I feel this is kind of embellished somewhat. When you write
>>
>>> This is not easy to read: obj1?.obj2?.prop3?:constant.
>>
>> you're not separating it out as you do when you write your preferred
>> version:
>>
>>> Syntax as follows: obj1?.obj2?.prop3 ?? constant
>>
>> How is
>>
>>> obj1?.obj2?.prop3 ?: constant
>>
>> not as easy to read as
>>
>>
>>> obj1?.obj2?.prop3 ?? constant
>>
>
> You're right, I didn't, that was intentional, because sometimes people write things like that. And it took a while for anyone to say anything about it. That is my point.
>
> But that's the thing. The ?? is significantly more obvious in the condensed version.
>
> This is something that a UX designer would recognize instantly, but human factors are very definitely not our strong skill as engineers. FWIW, my human factors experience comes from the deep study of airline crashes that I do as a pilot.
>
>> to me they are the same in terms of readability, only with ?? you have
>> greater chances of mistyping and adding a second ? in there somewhere,
>> whereas the ?: is just a contraction of the current syntax, I really
>> don't think it's that difficult, so I'm not sure what people's hang-ups
>> are, but I don't think the argument that ?? is easier to read than ?:
>> holds any weight here, because one *is* a change to the language, and
>> the other is a change to the parser and a contraction of a standard
>> convention.
>>
>
> Two things. ?: is ALSO a change a to language (lexer+parser). As to the whole "it's no more likely to typo the colon than the question" argument, sure, but that depends on the keyboard layout more than anything else, what works for you may not work elsewhere. And in either case, it's an easy compiler error. So you don't win anything with the ?:, but you win readability with the ??. MSFT spends a LOT of time studying these things. It would be wise to learn for free from the money they spent.

I still dont get your point. Are you sure `??` isn't more readable for you, because you are just used to it?

I think `?:` makes more sense to me and people who learn the D programming language.
At least As log as `null` becomes `false` and non-null-pointer becomes `true`.

If the operator shall check for `null` only, I would be fine with `??`.
Because then it wouldn't be a true shortcut of  https://dlang.org/spec/expression.html#ConditionalExpression  anymore

I wonder what Mr. Bright and Mr. Alexandrescu would say about the request to implement both, `??` and `?:`.
November 10, 2017
On Friday, 10 November 2017 at 19:59:29 UTC, meppl wrote:
> On Friday, 10 November 2017 at 05:23:53 UTC, Adam Wilson wrote:
>> On 11/6/17 12:20, Michael wrote:
>>> I can't quite see why this proposal is such a big deal to people - as
>>> has been restated, it's just a quick change in the parser for a slight
>>> contraction in the code, and nothing language-breaking, it's not a big
>>> change to the language at all.
>>>
>>> On Monday, 6 November 2017 at 19:13:59 UTC, Adam Wilson wrote:
>>>> I am all for the Elvis operator, however I have two reservations about
>>>> it. The first is that I don't see much use for it without a
>>>> null-conditional. The second is that the current proposed syntax ?: is
>>>> MUCH to easily confused with ?.
>>>>
>>>> This is not easy to read: obj1?.obj2?.prop3?:constant.
>>>>
>>>> When designing syntax sugar, ergonomics are very important, otherwise
>>>> people won't use it. Microsoft spent a LOT of time and treasure to
>>>> learn these lessons for us. I see no reason to ignore them just
>>>> because "we don't like Microsoft"
>>>>
>>>> My proposal would be to copy what MSFT did, expect that I would I
>>>> would introduce both operators at the same time.
>>>>
>>>> Syntax as follows: obj1?.obj2?.prop3 ?? constant
>>>>
>>>> In practice I don't see much use of the idiom outside of null's. The
>>>> ONLY other thing that would work there is a boolean field and you
>>>> might as well just return the boolean itself because the return values
>>>> have to match types.
>>>
>>> I feel this is kind of embellished somewhat. When you write
>>>
>>>> This is not easy to read: obj1?.obj2?.prop3?:constant.
>>>
>>> you're not separating it out as you do when you write your preferred
>>> version:
>>>
>>>> Syntax as follows: obj1?.obj2?.prop3 ?? constant
>>>
>>> How is
>>>
>>>> obj1?.obj2?.prop3 ?: constant
>>>
>>> not as easy to read as
>>>
>>>
>>>> obj1?.obj2?.prop3 ?? constant
>>>
>>
>> You're right, I didn't, that was intentional, because sometimes people write things like that. And it took a while for anyone to say anything about it. That is my point.
>>
>> But that's the thing. The ?? is significantly more obvious in the condensed version.
>>
>> This is something that a UX designer would recognize instantly, but human factors are very definitely not our strong skill as engineers. FWIW, my human factors experience comes from the deep study of airline crashes that I do as a pilot.
>>
>>> to me they are the same in terms of readability, only with ?? you have
>>> greater chances of mistyping and adding a second ? in there somewhere,
>>> whereas the ?: is just a contraction of the current syntax, I really
>>> don't think it's that difficult, so I'm not sure what people's hang-ups
>>> are, but I don't think the argument that ?? is easier to read than ?:
>>> holds any weight here, because one *is* a change to the language, and
>>> the other is a change to the parser and a contraction of a standard
>>> convention.
>>>
>>
>> Two things. ?: is ALSO a change a to language (lexer+parser). As to the whole "it's no more likely to typo the colon than the question" argument, sure, but that depends on the keyboard layout more than anything else, what works for you may not work elsewhere. And in either case, it's an easy compiler error. So you don't win anything with the ?:, but you win readability with the ??. MSFT spends a LOT of time studying these things. It would be wise to learn for free from the money they spent.
>
> I still dont get your point. Are you sure `??` isn't more readable for you, because you are just used to it?
>
> I think `?:` makes more sense to me and people who learn the D programming language.
> At least As log as `null` becomes `false` and non-null-pointer becomes `true`.
>
> If the operator shall check for `null` only, I would be fine with `??`.
> Because then it wouldn't be a true shortcut of  https://dlang.org/spec/expression.html#ConditionalExpression  anymore
>
> I wonder what Mr. Bright and Mr. Alexandrescu would say about the request to implement both, `??` and `?:`.

?: is a special case of the ternary operator of C. It is well established as extention in gcc and clang since forever. It is annoying that the C standard didn't incorporate it (afair because of Microsoft which didn't support it in Visual C) as it is quite practical.
Someone in the thread claimed its poor value because it only saved 1 character typing but that argument is idiotic as it is not used to replace
 a?a:b with a?:b but rather with something more like that

int code = holyshitbigassfunct(this, wathever, FOO, BAR);
if(!code)
  code = -1;
do_something(code);
with
do_something(holyshitbigassfunct(this, wathever, FOO, BAR) ?: -1);

Ok, I made up that example, but it is the kind of things that I was able to replace in my C project when I started to allow the Elvis operator.
I don't think that the benefit for D will be as spectacular as a lot of boilerplate can be avoided in other ways, but the message that I would like to bring over here, is that sometimes the benefit of a syntax sugar is not immediatly obvious when using the basic construct.


November 10, 2017
On Friday, 10 November 2017 at 14:37:13 UTC, bauss wrote:
> On Friday, 10 November 2017 at 12:48:53 UTC, codephantom wrote:
>> On Friday, 10 November 2017 at 12:42:55 UTC, Satoshi wrote:
>>> 99% of Windows users couldn't find how to do basic stuff in Linux ..
>>
>> yeah.. imagine if I had said that...all hell would have broken loose.
>
> And 99% of Linux users don't know what the word convenience and user-friendly mean.

dude! why is that pointed at me?

I was just repeating what someone else said, to demonstrate, that if i had said that, certain people on these forums would feel even more justified to have a go at me.

I think you're just demonstrating my point...and I didn't even say it.

I'm one of the few people on these forums, i expect, that quad boots into different operating system every day. I have almost everyone os in a virtual machine too.

I like and prefer FreeBSD to them all, but I don't limit myself to it.

I'm sick of MSFT fanboys on these forums having a got at me!