• 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: WTF? How can this work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WTF? How can this work?


  • Subject: Re: WTF? How can this work?
  • From: Chris Gehlker <email@hidden>
  • Date: Mon, 20 Aug 2001 10:07:54 -0700

On 8/20/01 2:20 AM, "Ondra Cada" <email@hidden> wrote:

> Chris,
>
> well, it's rather an issue of an opinion, but...
>
>>>>>>> Chris Gehlker (CG) wrote at Sun, 19 Aug 2001 18:46:00 -0700:
> CG> >2nd BUT: security: if I am using an immutable class and I make a bug of
> CG> >using is as if it were a mutable one, I suppose the app would stop and
> CG> >write a decent info to console!
> CG>
> CG> I can't agree here. I don't want ANY error checking overhead on
> CG> fundamental methods of the fundamental containers. I think it would be
> CG> much better to provide NSCheckedArray and NSMutableCheckedArray for when
> CG> this kind of thing is needed.
>
> ...would you like the index-in-bounds check to go from NS(NonChecked)Arrays
> as well? Etc.

Well yes, actually I would on balance. But it's not the same thing, is it?
What you were asking for was a run time check to see if code violates the
contract implicit it the return type. Said runtime check would merely
backstop a compile time warning that is already provided.

I think there is room for serious people to disagree on the range check
issue. I don't feel the same way about mutable/immutable issue.

Everything doesn't need to be C++ but it doesn't need to be Visual Basic
either.
--
Nature will bear the closest inspection. She invites us to lay our eye
level with her smallest leaf, and take an insect view of its plain. -Henry
David Thoreau, naturalist and author (1817-1862)


References: 
 >Re: WTF? How can this work? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Rotating an image
  • Next by Date: Forcing the documentType in saveDocumentTo:
  • Previous by thread: Re: WTF? How can this work?
  • Next by thread: Re: WTF? How can this work?
  • Index(es):
    • Date
    • Thread