File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Cattle Drive and the fly likes Style Guide Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Style Guide" Watch "Style Guide" New topic

Style Guide

Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
After reading the response to my first assignment submission, I thought I'd better read that style guide again. Can anyone explain this further:
Hungarian Notation violates OO abstraction and is not to be used.
I know what Hungarian notation is, a little shaky on OO abstrataction.
paul wheaton

Joined: Dec 14, 1998
Posts: 20965

This is one that we've covered in some huge detail in the past. Do a search on all forums for "hungarian" to find all that old stuff.
A quick description is that with abstraction, you don't know anything about the innards of a variable. The variable just holds data. If you use HN, you are exposing its innards, so you have lost your abstraction.
There are lots of other reasons to not use HN, most involve refactoring. The search should turn up far more than you ever wanted to know.

permaculture Wood Burning Stoves 2.0 - 4-DVD set
I agree. Here's the link:
subject: Style Guide
It's not a secret anymore!