On 10 March 2012 22:22, Hans-Martin Mosner hmm@heeg.de wrote:
Am 10.03.2012 12:08, schrieb Igor Stasenko:
Just out of curiosity, can anyone say (without looking into image), what <primitive: 135> does? And now, same question, what <primitive: #primitiveMillisecondClock> does?
Never ending fight: meaningful names vs meaningless numbers
Since a primitive is typically a low-level implementation of a method (whose name, comment and maybe primitive failure code should state what it actually does), there's not really a guessing game. Granted, your suggestion would make it look a little nicer, so if you just want to implement it, it would probably be accepted easily. However, I don't see it as a most pressing problem...
It is not a pressing problem, unless you see it at larger scale, because this is not a single place in system, where you can find use of numeric constants.
Instead of abstractions, numbers turning us into computers who should remember strange numbers and their meaning in various different contexts, making code brittle and error prone, wasting our time and effort, but worst of all, making newbies sitting clueless, what are those numbers mean, what is connection between their values and code logic.
Every time when you use a numeric constant - a little cute animal dies. :)