Re: Libraries and effiency
Re: Libraries and effiency
- Subject: Re: Libraries and effiency
- From: Tommy Bollman <email@hidden>
- Date: Fri, 6 Aug 2010 14:31:56 +0200
Hello.
What Mark J. Reed writes is a whole lot easier if the filenames are unique for the different versions. Takinginto consideration that you may have several scripts that uses the same library, so that you won't break any scripts that relied on the old functionality.
On 6 Aug 2010, at 14:20, Mark J. Reed wrote:
> To address the migration problem, all you have to do is modify the
> script you currently load so that it turns around and loads all the
> modules it currently encompasses. Then your current scripts will
> still work, and you can go through them one at a time and change them
> so they just load what they need instead of using the old script.
>
> On Friday, August 6, 2010, Tommy Bollman <email@hidden> wrote:
>> Hello.
>>
>> Wether that mechanism is implemented all over the place or not; I find that particular mechanism to be a bad idea as a whole.
>> It may be preferable from a developers point of view, but it isn't so for a user, which then will have to track down what is a miss, because he hasn't got that version installed, and the system are showing know errors about missing files because it found something higher up in the tree.
>>
>> -I believe that unique names is the way to go, or that one library file can only reside in one physical path. -I may agree on the benefits of being able to implement something either globally like with the /Library/Preferences v.s. those in ~/Library/Preferences, *but it stops right there*. Tetsuro is taking this approach further, by allowing for adding folders to the search path. And then one may possible end up with a situation that was referred to as "the DLL nightmare" in yesteryears, where you have to go an inspect which version of the library you got, and which is called, -it is really an unfruitful way to spend time when such situations are encountered.
>>
>> I think different versions of something should be reflected by their filenames, in order to trap what is installed and not installed, when using such a load mechanism as Tetsuro's.
>>
>> On 6 Aug 2010, at 13:35, Philip Aker wrote:
>>
>>> On 2010-08-06, at 04:20:32, Philip Aker wrote:
>>>
>>>> On 2010-08-06, at 04:05:37, Tommy Bollman wrote:
>>>>
>>>>> Last night I looked at Tetsuros code, and his way of make this mechanism work, taking for granted that the code does what it is supposed to do. It is all very clever, but IMHO, this approach is dangerous.
>>>>
>>>>> The things I find dangerous is that you can't hardcode paths to libraries, and that the module loader will search several libraries and use the script library found in the latest path. It is stuff like this that creates situations where it is very hard to detect what is really going on when something is at err.
>>>>
>>>> I'm not sure what you're getting at.
>>>>
>>>> Tetsuro is using FSFindFolder(). The fallback mechanism for standard system paths is used all over the place in Mac OS X — for instance if you place a custom framework in /Library/Frameworks/Tcl.framework, then it overrides the one in /System/Library/Frameworks/Tcl.framework.
>>>
>>> Well, actually that's not such a good example for the situation at hand. A better one would be the preferences located in
>>>
>>>
>>> Philip Aker
>>> echo email@hidden@nl | tr a-z@. p-za-o.@
>>>
>>> Democracy: Two wolves and a sheep voting on lunch.
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>> Best regards
>>
>>
>>
>> Tommy Bollman
>> --------------------------------------------------------------------------------------------------
>> Mollison's Bureaucracy Hypothesis:
>> If an idea can survive a bureaucratic review
>> and be implemented it wasn't worth doing.
>>
>> _______________________________________________
>> 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
>>
>
> --
> Mark J. Reed <email@hidden>
>
Best regards
Tommy Bollman
--------------------------------------------------------------------------------------------------
Mollison's Bureaucracy Hypothesis:
If an idea can survive a bureaucratic review
and be implemented it wasn't worth doing.
_______________________________________________
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