Bret Victor - Inventing on Principle
Regan Heath
regan at netmail.co.nz
Tue Nov 20 04:29:16 PST 2012
On Tue, 20 Nov 2012 09:54:43 -0000, renoX <renozyx at gmail.com> wrote:
> That said, when he plays with numeric values in the code, I can't help
> thinking: this is wrong there shouldn't be "magical" numerical value in
> the code as this is not maintainable/readable.
Agreed. Imagine if the magical numbers were all defined with CONSTANT's
as any good programmer would do. In that case clicking one and dragging
the slider would by default, change the value for all uses of CONSTANT.
Alternately, there could be a hot-key which defines a new CONSTANT with
the new slider value for that single usage.
All doable with a sufficiently clever IDE.
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list