• 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: List Question: Can someone explain this to me?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List Question: Can someone explain this to me?


  • Subject: Re: List Question: Can someone explain this to me?
  • From: Helmut Fuchs <email@hidden>
  • Date: Fri, 14 Jun 2002 13:26:22 +0200

At 11:37 Uhr +0100 14.06.2002, Charles Arthur wrote:
No, I think the ASLG is glossing over the fact that it's cheap to fill
registers with data such as a number or text, but expensive to set up the
pointers required to follow a list (or record, or script object) around
memory. It's an assembler-level question.
Well, I guess it's not. Though you're right about the (speed and especially _memory_) efficiency issue, I still tend to believe it's got more to do with what is normally done with lists, records and scripts as opposed to strings and numbers and such.

Lists, records (and scripts) are normally accessed and modified not as a whole, but in small chunks - so it's quite sensible to make using them by reference the default instead of the exception.

In another Apple grown language, i.e. NewtonScript, objects were divided into two classes: mutable and immutable - mutable object classes _always_ being references and immutable object classes _always_ being copied - and the Documentation made sure everybody got this point of distinction, whereas ASLG doesn't draw this line so clearly. At least not that obviously.

And if you're wondering about AppleScript's behaviour: in PostScript even substrings are handled by reference... fun debugging if you're stumbling over such a thing for the first time...

-Helmut
_______________________________________________
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.

  • Prev by Date: Re: applescript and graphics programs
  • Next by Date: Re: List Question: Can someone explain this to me?
  • Previous by thread: Re: List Question: Can someone explain this to me?
  • Next by thread: Re: List Question: Can someone explain this to me?
  • Index(es):
    • Date
    • Thread