• 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: OO Theory misconceptions (was Re: can I make a list of
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OO Theory misconceptions (was Re: can I make a list of


  • Subject: Re: OO Theory misconceptions (was Re: can I make a list of
  • From: email@hidden (Michael Sullivan)
  • Date: Thu, 31 Jan 2002 14:07:58 -0500
  • Organization: Society for the Incurably Pompous

Nigel Garvey:
> email@hidden wrote on Thu, 31 Jan 2002 00:02:31 -0500:

> > {double() of sO, double() of sS, double() of sN, root() of sN}
> > --> Result: {"Make mine a double!", "HiHi", 84, 6.480740698408}

> Allowing for the fact that there's no sqrt() function provided, this
> result depends on makeSillyNumber having been called with a parameter of
> 42.

You mean that there's no type checking to keep the user from doing this
call?

makeSillyNumber from "This is not a number"

I imagine that you could add type checking to the construction code.

Something like:

Try
v as number
on error
error 2 "Cannot makeSillyNumber from class: " & class of v
end try

> Well, that just about knocks it on the head for modular, "easily
> maintainable" code.... ;-)

Snicker. That's not exactly Applescript's strongpoint.


Michael

--
Michael Sullivan
Business Card Express of CT Thermographers to the Trade
Cheshire, CT email@hidden


References: 
 >Re: OO Theory misconceptions (was Re: can I make a list of (From: Nigel Garvey <email@hidden>)

  • Prev by Date: URLAS cannot submit forms in OS X
  • Next by Date: Export to PDF from Quark in OS 9
  • Previous by thread: Re: OO Theory misconceptions (was Re: can I make a list of
  • Next by thread: Re: OO Theory misconceptions (was Re: can I make a list of
  • Index(es):
    • Date
    • Thread