That is pretty neat too.

Generally speaking, if there is a standard function that does what I need, I 
prefer it. Two reasons:

  * The code is concise: In `c in 'A'..'Z'` the reader has to infer what you 
are testing, whereas in `c.isUpperAscii` you need 0 brain cycles, it is 
obvious. In this particular case, though, the range check is very intuitive.
  * Performance: If there is a function in the standard library that does what 
I need exactly, chances are it is using the most performant implementation 
possible. In the rare case that it does not, you send a patch.



Those are two generic principles of mine, but thanks for the alternative!

Reply via email to