On Thursday, 20 December 2018 at 02:05:53 UTC, Adam D. Ruppe wrote:
On Thursday, 20 December 2018 at 01:37:59 UTC, Simón Oroño wrote:
The only difference (code-wise) is the `const` keyword. I've tried with both `ldc` and `dmd` with same result. Why is the output different when the variable is `const`?

A const range cannot be iterated by a generic template (without additional work, at least), so writeln just sees it as a blob instead of something it can loop over.

I'm not the OP but I'd like to understand this:

When he is comparing "a == b" it returns true, but then it diverges on the usability.

So a == b compares just values without types?

But is this right? I mean if they are equal shouldn't they have the same behavior?

Marko.

Reply via email to