On Tue, May 3, 2011 at 7:22 AM, Kevin Wright <kev.lee.wri...@gmail.com>wrote:
> it's probably better >> to err on the side of caution and always be explicit about variable >> scope either via their names or by using "long form": >> Person.COMMON_GOOD.giveFrom(this.cashMoney) >> >> > This smells a lot like the widely discredited hungarian notation, encoding > the type of a variable in its name. > First of all, the example given by Alexey is not Hungarian Notation at all, and second, the "real" Hungarian Notation, as described by Joel Spolsky<http://www.joelonsoftware.com/articles/Wrong.html> (it's in the second part of the article), is actually quite useful and we all use some form of it regardless of the language you use (e.g. when you see a variable called "i", is it more likely to be an index for a loop or an iterator?). In my ideal world... as we see more developers embrace immutability, and > languages adopting ideas like the uniform access principle, and Scala's > unification of constructor params with member values, we'll see less need > for this sort of disambiguation in the future. > It's still there and it's still useful when you need to disambiguate not by type but by semantic. -- Cédric -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com. To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.