On Saturday, 19 November 2016 at 15:40:38 UTC, Ryan wrote:
Wouldn't this just be the same as
auto hasConsole = cast(bool) GetConsoleCP(); ?

Yes, it is in D, though the habit often comes from C where things are different. But people also may prefer !! for just being shorter and once you know the pattern, you'll see them as meaning the same thing.

I think the GetConsoleCP() != 0 code is the clearest about your intentions.

yeah that's my preference too. But they still mean the same thing so you get used to all the forms.
  • W... Ryan via Digitalmars-d-learn
    • ... Xinok via Digitalmars-d-learn
      • ... Era Scarecrow via Digitalmars-d-learn
        • ... Is it possible to store different generic types? via Digitalmars-d-learn
          • ... Is it possible to store different generic types? via Digitalmars-d-learn
            • ... Ryan via Digitalmars-d-learn
              • ... Adam D. Ruppe via Digitalmars-d-learn
                • ... Patrick Schluter via Digitalmars-d-learn

Reply via email to