in reply to Re^5: Best practice or cargo cult?
in thread Best practice or cargo cult?

The default semantics are more well-known than any non-default set of semantics. That is the nature of being the default.

I'm not arguing that the reader of code should blindly assume the default semantics apply in any given case, but rather that there is no cause to request that non-default semantics be applied in cases where the default semantics are more than adequate and, further, that most1 code out there seems to use the default semantics in most1 places. By consistently depending on non-default semantics, you may be more self-consistent, but you are less consistent with the rest of the world.

1 I suspect that "the vast majority" would be more accurate, but I have no proof that such is the case.

Replies are listed 'Best First'.
Re^7: Best practice or cargo cult?
by ikegami (Patriarch) on Jun 20, 2006 at 23:32 UTC

    "Most" is a weasel word. In fact, the opposite has been true in my experience: Among the regexps that use ^, $ or ., at least half required s or m. I don't have a good idea of what the percentage would be if I included those requiring x. I don't know if the rest of the world is in the same boat or not.

    Anyway, I do see your point. There's definitely value in being consistent with the rest of the world, but there must be a point at which world-consistency is outweighed by other concerns. I wonder what it takes.