Comment on Programming IdiomsComments−saagarjha6yThese kinds of collections can be nice, but I think it’s fair to warn against looking at them too closely. Sometimes they’re not actually idiomatic and often the implementations have differences in them that see non-obvious.−tgv6yAnd some have problems: the Python example of reading a file into a string is: lines = open(f).read() which doesn't close the file. The second C example of this task is tricky, and seems to miss an offset.The C and Go implementations of uniform random integer include the upper limit, the Python and Rust implementations don't.And that's just from quickly browsing.
Comments
These kinds of collections can be nice, but I think it’s fair to warn against looking at them too closely. Sometimes they’re not actually idiomatic and often the implementations have differences in them that see non-obvious.
And some have problems: the Python example of reading a file into a string is:
which doesn't close the file. The second C example of this task is tricky, and seems to miss an offset.The C and Go implementations of uniform random integer include the upper limit, the Python and Rust implementations don't.
And that's just from quickly browsing.