hungarian-notation

What does the 'k' prefix indicate in Apple's APIs? [duplicate]

心已入冬 提交于 2019-11-27 20:21:56
This question already has an answer here: Lower case “k” in Cocoa 2 answers I've run across many examples of Core Foundation variables named k + someVariableNameHere or k + APILibraryName(2Char) + someVariableNameHere . What does this prefix K indicate? Examples include: kGLPFAStereo kCollectionLockBit kSetDebugOption Jarret Hardie The k means constant in hungarian notation... see Lower case "k" in Cocoa . This is a naming convention from the early days of macintosh programming. It indicates a constant. 来源: https://stackoverflow.com/questions/675816/what-does-the-k-prefix-indicate-in-apples

Good Examples of Hungarian Notation? [closed]

馋奶兔 提交于 2019-11-27 18:02:53
This question is to seek out good examples of Hungarian Notation, so we can bring together a collection of these. Edit: I agree that Hungarian for types isn't that necessary, I'm hoping for more specific examples where it increases readability and maintainability, like Joel gives in his article (as per my answer). Mark Cidade The problem with asking for good examples of Hungarian Notation is that everyone's going to have their own idea of what a good example looks like. My personal opinion is that the best Hungarian Notation is no Hungarian Notation . The notation was originally meant to

textBoxEmployeeName vs employeeNameTextBox

末鹿安然 提交于 2019-11-27 16:06:02
问题 Which naming convention do you use and why? I like to use employeeNameTextBox, because: It seems more natural from an English language perspective. I find it's easier to look up with Intellisense. The convention is similar to the convention used for events (MouseClickEvent, MouseClickEventHandler) and dependency properties (VisiblityProperty). Note: I am using the full name rather than an abbreviation (such as "tb"), because it is in line with MS's naming conventions that say to avoid using

Do people use the Hungarian Naming Conventions in the real world? [closed]

不想你离开。 提交于 2019-11-27 05:41:54
问题 Is it worth learning the convention or is it a bane to readability and maintainability? 回答1: Considering that most people that use Hungarian Notation is following the misunderstood version of it, I'd say it's pretty pointless. If you want to use the original definition of it, it might make more sense, but other than that it is mostly syntactic sugar. If you read the Wikipedia article on the subject, you'll find two conflicting notations, Systems Hungarian Notation and Apps Hungarian Notation

Good Examples of Hungarian Notation? [closed]

懵懂的女人 提交于 2019-11-27 04:15:43
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . This question is to seek out good examples of Hungarian Notation, so we can bring together a collection of these. Edit: I agree that

What does the 'k' prefix indicate in Apple's APIs? [duplicate]

﹥>﹥吖頭↗ 提交于 2019-11-26 20:19:06
问题 This question already has an answer here: Lower case “k” in Cocoa 2 answers I've run across many examples of Core Foundation variables named k + someVariableNameHere or k + APILibraryName(2Char) + someVariableNameHere . What does this prefix K indicate? Examples include: kGLPFAStereo kCollectionLockBit kSetDebugOption 回答1: The k means constant in hungarian notation... see Lower case "k" in Cocoa. 回答2: This is a naming convention from the early days of macintosh programming. It indicates a

Why shouldn't I use “Hungarian Notation”?

大城市里の小女人 提交于 2019-11-25 22:48:14
问题 Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I know what Hungarian refers to - giving information about a variable, parameter, or type as a prefix to its name. Everyone seems to be rabidly against it, even though in some cases it seems to be a good idea. If I feel that useful information is being imparted, why shouldn\'t I put it right there where it\'s available?