Dual conditions in D and Python
Dennis Ritchie via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu May 21 09:57:14 PDT 2015
Hi,
In Python I can write this:
if (4 <= 5 <= 6):
print ("OK")
-----
http://rextester.com/NNAM70713
In D, I can only write this:
import std.stdio;
void main() {
if (4 <= 5 && 5 <= 6)
puts("OK");
}
-----
http://rextester.com/FICP83173
I wanted to ask what is the reason? Maybe the program on Python's
slower because of this? Or legacy C/C++ affected D?
More information about the Digitalmars-d-learn
mailing list