MS quirk 'o the day

djberg96 on 2004-07-15T18:55:38

One weird thing smacked me when rewriting a bunch of C code to use OLE + WMI: the uint64 values are returned as *strings* instead of bigint's. Originally I thought this was a bug in the OLE extension, but not so it seems. In Perl you likely would never notice this, but it smacked me with Ruby, and I confirmed it with Python (which returns them as Unicode strings).

/me wonders how this came to be


They learned from the masters

schwern on 2004-07-16T05:41:12

int getchar();

Re:They learned from the masters

Dom2 on 2004-07-16T06:49:38

The justification for that decision was that you need to be able to return a non-valid character to signal EOF. But it's symptomatic of type abuse that you then have to downgrade to char where needed. And that by the language authors too...

-Dom