November 10, 2017
On Friday, 10 November 2017 at 19:59:29 UTC, meppl wrote:
> I wonder what Mr. Bright and Mr. Alexandrescu would say about the request to implement both, `??` and `?:`.

Seriously? Implement both?

I'm really not sure whether that's just meant to be humour or what.

The first things that should be on everyones mind, is to avoid unnesecsary variations in a programming language. It's one of the things that many languages don't get.

If D gets both, that'll be the end of my interest in D.

November 10, 2017
On Monday, 6 November 2017 at 12:25:06 UTC, Biotronic wrote:
> I find I often use this in C# with a more complex expression on the left-hand side, like a function call. A quick search shows more than 2/3 of my uses are function calls or otherwise significantly more complex than a variable. Also, it works great in conjunction with the null conditional:
>
> foo.Select(a => bar(a, qux)).FirstOrDefault?.Name ?? "not found";
>
>> It seems to be targeted primarily at code that does a lot with classes and is written in such a way that it's not clear whether a class reference should be null or not, whereas most D code doesn't do much with classes.
>
> In my C# code, it's used with strings and Nullable<T> more often than with classes.
>
> Given my own experience with the ?? operator, I'd argue it's probably not worth it without also including null conditional (?.). A quick search in a few projects indicate roughly half the uses of ?? also use ?..
>
> --
>   Biotronic

Without including ".?", this proposed "Elvis operator" will just be ECMAScript-style "||". I think it will still be useful because "||" is useful, but it would be more elegant to just allow "a || b" to have the common type of "a" and "b" (which wouldn't change the truthiness of the expression) instead of introducing a new operator that is exactly like "||" except it doesn't force the result to be bool.
November 10, 2017
On Friday, 10 November 2017 at 11:19:39 UTC, Satoshi wrote:
>
> You are judging C#, but looks where is D and where is C#.

Where is C#?

- good luck porting it to other (non MS, non .NET environments).
- performance of large code bases can often be sluggish
- VS.NET does most of the coding for you.
- most C# developers have no idea what's being done behind the scenes.
- you can't create a function outside of a class (great design decision btw!)

I could go on..and on...

It's had good sides and bad sides.

MSFT fanboys are unable to distinguish the difference, and think everything must be great, cause MSFT/C# did it.

MSFT have spent the last 7 years mostly adding useless stuff to C# - but like their design descions about Windows, and their other products. Instead of real innovation, we just get more useless stuff.

These forums need more critical thinking, and better justification for new features (other than 'cause MSFT knows best'), or ('cause the language I'm used to using has it').

November 11, 2017
On Friday, 10 November 2017 at 23:14:50 UTC, codephantom wrote:
> On Friday, 10 November 2017 at 11:19:39 UTC, Satoshi wrote:
>>
>> You are judging C#, but looks where is D and where is C#.
>
> Where is C#?
A supported and very popular language. Seriously in it the top ten popular language list for a good reason. You should google it.
>
> - good luck porting it to other (non MS, non .NET environments).
https://en.wikipedia.org/wiki/Mono_(software)
> - performance of large code bases can often be sluggish
Examples?
> - VS.NET does most of the coding for you.
https://en.wikipedia.org/wiki/Just-in-time_compilation
> - most C# developers have no idea what's being done behind the scenes.
Neither do the majority of developers when it comes to their compilers.
> - you can't create a function outside of a class (great design decision btw!)
That why C# have static classes.
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members
Not every programming language in existence needed to be Procedural based Language. You need to expand your horizons when it comes to different types of languages.


> These forums need more critical thinking, and better justification for new features (other than 'cause MSFT knows best'), or ('cause the language I'm used to using has it').
You should take your own advice first, when you insult other people by calling them "Microsoft fanboys". Take your snark somewhere else.

November 11, 2017
On Saturday, 11 November 2017 at 01:37:01 UTC, 12345swordy wrote:
> A supported and very popular language. Seriously in it the top ten popular language list for a good reason. You should google it.

I don't have to google it. I've been using it for 17 years.

> - VS.NET does most of the coding for you.
> https://en.wikipedia.org/wiki/Just-in-time_compilation

Won't be long till they do it ALL for you.


> Neither do the majority of developers when it comes to their compilers.

Do most C# programmers even know what a compiler is?
When was the last time a C# programmer actually compiled anything... I mean really...they just push button and have no idea whats going on.


> That why C# have static classes.
> https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members

> Not every programming language in existence needed to be Procedural based Language. You need to expand your horizons when it comes to different types of languages.

Can't take the criticism of C#?

And your telling me to expand my horizons..

Hahhhaaa.....

Just another MSFT fanboy..gee..their really coming out now...


November 11, 2017
On Saturday, 11 November 2017 at 01:37:01 UTC, 12345swordy wrote:
> You should take your own advice first, when you insult other people by calling them "Microsoft fanboys". Take your snark somewhere else.

I'm just dishing out what they've been doing to me, simply cause I dared to critcise something that MSFT produce.

You take your snark elsewhere!

November 11, 2017
On Saturday, 11 November 2017 at 01:37:01 UTC, 12345swordy wrote:
> best'), or ('cause the language I'm used to using has it').
> You should take your own advice first, when you insult other people by calling them "Microsoft fanboys". Take your snark somewhere else.

Any opinion/idea offered by someone who can't take criticism of MSFT products, is not worth very much to me. As far as I'm concerned, it demonstrates a closed mind, incapable of exploring alternative solutions. It invites suspicion.

Now...if you're not actually a 'MSFT fanboy', then i dare you to post a link that criticises the C# langauge, or any other MSFT product.

November 11, 2017
On Saturday, 11 November 2017 at 01:37:01 UTC, 12345swordy wrote:
> You should take your own advice first, when you insult other people by calling them "Microsoft fanboys". Take your snark somewhere else.

and btw. if you had gone back a few threads (instead of just jumping into a conversation to just have a go at me), then you'd know that it all started because i attempted to inject some humour into the converstation, and used a youtube video that made fun of the design of Windows 10 - in a humerous manner.

What results from that, was some guy telling me that I was bashing on Adam. That i was anti this and anti that.

Then others got involved too, trying to bash on me even further.

The same thing happened when I mentioned my concern that 64bit D on Windows can only happen if the user is prepared to download GB's of propriatory, closed source, bloatware. When I did that, MSFT fanboys came out to dump on me, instead of saying..yeah..perhaps that might be a good way for D to proceed.

So, if you're all willing to dish it out to me, you better be prepared to take some too!

D's future will depend not on how well it ties into a propriatory o/s, but who well it runs in open source environments. Anyone who doesn't see that, doesn't understand whats going on in the world of software development. Even MSFT get that, and are now trying to port C# as quickly as possibly to other platforms to hold off the competition that's already here, and more to come.

I think D is where it is, because it was developed on Windows (windows 32 bit it seems). Had it been developed on an open source operating system, I expect it would be miles ahead of where it currently is.

If D is making Windows its platform priority, then it has to compete with exiting MSFT solutions on the platform, which in my mind, are far superior to anyting D can or will be able to provide. D should focus its attention elsewhere.

That's just my opinion. Others can disagree. I don't mind disagreement. But I mind not being allowed to disagree!


November 11, 2017
On Friday, 10 November 2017 at 05:23:53 UTC, Adam Wilson wrote:
> MSFT spends a LOT of time studying these things. It would be wise to learn for free from the money they spent.

This is valid MSFT code, I believe:

A?.B?.C?[0] ?? E
A?.B?.C?[0] == E

I have been coding on and off, since 1992, in various languages.

So can you please tell what this code means?

Can you please tell me what it was that MSFT learnt (and spent money to do so), so as to enable coders to write such code?

November 11, 2017
On Friday, 10 November 2017 at 05:23:53 UTC, Adam Wilson wrote:
> MSFT spends a LOT of time studying these things. It would be wise to learn for free from the money they spent.

I just saw this about the new 'damnit' operator, for C# 8.

https://github.com/dotnet/csharplang/issues/556

I thought it was a joke at first, but they are serious.

C# seem to becoming language of operators.

ool? a, b;
...
var x = !a! != b! ? a! : !b!;

Yeah...lets follow there example...they seem to know better.