• 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: Are NSScanners deprecated?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are NSScanners deprecated?


  • Subject: Re: Are NSScanners deprecated?
  • From: Brian Webster <email@hidden>
  • Date: Tue, 9 Jul 2002 09:55:10 -0500

On Tuesday, July 9, 2002, at 08:03 AM, cocoa-dev-
email@hidden wrote:

on 02-07-09 4:27 AM, Nicola Vitacolonna at email@hidden wrote:

According to Apple's documentation (Programming Topics: Strings),
NSScanners are deprecated. They suggest using NSFormatters instead. Is
it really so? I think NSScanners and NSFormatters serve two different
purposes. E.g., how can I use an NSFormatter to parse a string, say, to
discard spaces and newlines (or whatever parsing process you like)?

Apple engineering managers have said here more than once that scanners are
NOT deprecated. I don't know why that line still appears in the
documentation. I think the current intent is that scanners are particularly
useful for writing formatters, and that otherwise formatters are probably
more useful than scanners for many applications.

There also seems to be a mention of Java there in the docs. NSScanner's API wouldn't translate very well into Java, plus Java has its own StringTokenizer class that people can use, so I'm guessing that was the original intent of the statement. I can't say that NSScanner is a particularly fun class to work with, either...

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Colors and NSUserDefaults
  • Next by Date: Closing an NSConnection
  • Previous by thread: Re: Are NSScanners deprecated?
  • Next by thread: Re: Mutable class problems
  • Index(es):
    • Date
    • Thread