B
Bill Kelly
From: "Jay Levitt said:I'm talking about what wikipedia calls an "unnamed numerical constant". It
took me a few seconds to realize that "10" was the length of "%!PS-Adobe".
Is PS.length (or size, if you prefer) longer to type? Yes. Is it likely
to change? No. Is it more explanatory? Yes. Will it still work when you
copy and paste this code to search for a different magic phrase? Yes.
Agreed 100%
From a readability standpoint I'd put it in the same category as
using, say, 90 instead of ?Z.
Or using 1246774599 instead of 'JPEG'.unpack("N").
The number of characters typed (golfing aside) shouldn't even enter
into consideration in cases like these.
Regards,
Bill