• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A few beginner questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A few beginner questions


  • Subject: Re: A few beginner questions
  • From: Paul Sargent <email@hidden>
  • Date: Mon, 14 Apr 2008 11:07:43 +0100


On 7 Apr 2008, at 17:07, Keary Suska wrote:

In particular you will find that Objective-C/Cocoa tends to use a convention
similar to the Hungarian "Apps" notation, were the purpose of the symbol is
incorporated into the name, although not always (or usually) as a prefix.

I'd also like to point out that in dynamically typed languages, incorporating the type into the name can limit your thinking (although this seems to be where the "solution" of Hungarian notation sprang up from).


In the past I've written code (in python, although it would be possible in other languages including obj c, although the strongly typed 'c' part can get in the way) that performed mathematical algorithms on whatever type that was passed, be it ints, floats, vectors, complex numbers, or arrays of any of those. Those types all conformed to a protocol (in obj-c speak) and the code didn't care about the type.

If you limit your thinking to "this variable is of type x" you can miss out on some very powerful techniques.

Hungarian notation seems like an attempt to bring a form of (human verified) strong typing into languages that didn't have it. I can see why you'd want to do that in a weakly typed language (VB), but it's not right for all situations and often it's followed like a religion.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Re: A few beginner questions (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: ISO Designators versus Legacy Language Designators for resources in Xcode
  • Next by Date: Re: What causes the main window to open?
  • Previous by thread: Re: A few beginner questions
  • Next by thread: Re: A few beginner questions
  • Index(es):
    • Date
    • Thread