> I really take issue with comparing the Ruby parser to a grammer checker. >
True, it's not really a fair comparison. English has a lot fewer edge cases. :) > And initializing the variables is often even uglier - tell the truth: > In choosing between this idiom or having a bunch of variables > initialized in initialize(), which do you hate more? :) > Why would I object to initializing instance variables in initialize()? That's what its *for*. If you want to use implicit initialization, fine, use it. If you don't, use explicit initialization. But as far as I can see rolling your own implicit initialization just to thwart the warning system doesn't get you anything but cluttered code. > Worse, since it often creates the possibility > > of a tri- (or even quad) state for booleanesque > > values (giving you now <undefined> in addition to > > nil, false, and everything else) it is just begging for > > for subtle logic bugs. > > I'm not entirely convinced on that, but I can tell you that I have > found cases where those four states actually were all different and > that difference did matter. > Those places should probably be found and refactored. At the very least, the intent would be clearer by moving the information to a Hash, where iteration over the keys, etc. would likely provide a more readable interface. But if they are to remain, that's all the more reason to clean up all the cases where it *doesn't* matter so the few cases where it does will stand out in stark contrast. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
