• 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: References, equals, and repeats (Was: Coerce string to strin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: References, equals, and repeats (Was: Coerce string to strin


  • Subject: Re: References, equals, and repeats (Was: Coerce string to strin
  • From: Bill Cheeseman <email@hidden>
  • Date: Fri, 15 Feb 2002 04:31:22 -0500

on 02-02-14 11:17 PM, Chris Page at email@hidden wrote:

> On Thursday, February 14, 2002, at 07:36 , email@hidden wrote:
>
>> Most languages seem to have this same strict definition of
>> equality. For
>> example, Java and Javascript both consider two reference types to
>> be equal only
>> if they refer to the same object. C certainly doesn't think &x ==
>> x (except
>> coincidentally). Visual Basic only allows "=" for numbers and
>> strings, but
>> provides "Is" as a "refers to the same object" strict equality
>> operator.
>
> That's why some languages, such as Dylan and Lisp, have separate
> operators for "equivalent values" vs. "are the same object". In
> Dylan's case, the operators are "=" and "==". In fact, I believe
> Lisp has one or two other kinds of "equals" beyond this.

Cocoa on Mac OS X has isEqual: for object identity (same memory address) and
isEqualToString: and similar for contents equality. These are part of the
Cocoa frameworks, of course, not an inherent part of Objective-C.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont - http://members.valley.net/croquetvermont
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: References, equals, and repeats (Was: Coerce string to strin (From: Chris Page <email@hidden>)

  • Prev by Date: Re: Son of Y2.401K
  • Next by Date: Re: Substitute for Labels in OS X?
  • Previous by thread: Re: References, equals, and repeats (Was: Coerce string to strin
  • Next by thread: scripting additions folder on X is readonly?
  • Index(es):
    • Date
    • Thread