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

Re: AS Library Question


  • Subject: Re: AS Library Question
  • From: has <email@hidden>
  • Date: Thu, 17 Dec 2015 19:09:51 +0000


> Shane Stanley wrote:
>
>On 17 Dec 2015, at 7:56 AM, Stan Cleveland <email@hidden> wrote:
>>
>> This may have been an off-handed remark on your part, has, but is an attractive and tenable option.
>
> Just be aware that there's another issue when ASObjC code is involved that affects both libraries and code loaded with load script, and from a trouble-shooting perspective, it's probably a *little* easier to deal with -- and spot -- using libraries loaded with a "use" statement.
>
> The problem is one of namespace, and particularly the fact that AppleScript's namespace is case-insensitive, whereas Objective-C's is not. There is at least one nasty edge case. [...]

Good points. Although it's not a 'namespace' problem, but rather AppleScript's originally well-intentioned but now counter-productive habit of normalizing variable names' case when compiling and formatting code; instead of leaving the author's original case intact and just choosing to ignore it when doing its own name lookups versus ObjC name lookups. But hey, as I say, there's nothing wrong with AppleScript that couldn't be fixed with a 100% total rethink, redesign, and rewrite. ;)

Question: What happens when you use AS's loader to load two different libraries[1], one that uses `foo` and the other `Foo`? I'm guessing it's going to depend on which of those libraries gets imported first, but it sounds like they could end up fighting with each other too?

has

[1] (FTLulz, let's call 'em "ShaneLib" and "HASLib":p)
_______________________________________________
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: AS Library Question
      • From: Chris Page <email@hidden>
    • Re: AS Library Question
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: AS Library Question
  • Next by Date: Re: AS Library Question
  • Previous by thread: Re: AS Library Question
  • Next by thread: Re: AS Library Question
  • Index(es):
    • Date
    • Thread