• 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: SmartSet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SmartSet


  • Subject: Re: SmartSet
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 18 Dec 2013 12:35:13 -0500


On Dec 18, 2013, at 10:56 AM, Luther Fuller wrote:

t "x ∊ y" ("x is an element of y") 

"x = y" is not at all equal to the statement, "x is a member of y", or "y contains x".

That assumption at the start of your explanation sorta throws a monkey wrench in the works of whatever you are explaining next.

In computery stuff, a unique set could be described as an array, a list, a table.

in Objective C's Cocoa, as Shane points out, a set (an NSSet) is essentially an array (NSArray) that does not allow addition of any object (NSObject instance) that already exists as a member in that array.

I think you're putting too much of Discrete Math or Discrete Structures into the explanation here and it's not a correct mapping over of concepts.

An empty "set" in Objective C's Cocoa framework, would not be 0, but would  be an empty array (NSArray, NSMutableArray), or set, (NSSet, NSMutableSet).

This empty set would either be an empty array/set with no elements or an array/set with one element which is of the type nil, which indicates the end of all data within the array/set. (I'm not sure which)

See, 0 is a number in the Cocoa framework, and it would be an NSNumber, not an NSSet or an NSArray.  NSNumbers can't hold more than one item, while NSArrays and NSSets can and are supposed to.  

So, your application of set theory isn't applicable here in the manner that you would expect it to be.  For your purposes, something has to change.  These structures would need to be wrapped (or extended) to return the expected results if you wish them to comply with set theory.

With regards to computery things, this would also mean that the type/class of your LutherSet item would appear to vary if it was empty or non empty and would need comparison routines properly determine if one instance of a LutherSet item is equal to or not equal to another LutherSet item, so you'd need something like Objective-C's "isEqualTo:" method in that class wrapper.

Cheers, 
- Alex Zavatone
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: SmartSet
      • From: Luther Fuller <email@hidden>
    • Re: SmartSet
      • From: Steve Bird <email@hidden>
References: 
 >SmartSet (From: Shane Stanley <email@hidden>)
 >Re: SmartSet (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: SmartSet
  • Next by Date: Changes in Evernote syntax?
  • Previous by thread: Re: SmartSet
  • Next by thread: Re: SmartSet
  • Index(es):
    • Date
    • Thread