Hi Eric!

I think this might be a better thread to help explain my position, and  
how I think we should proceed on this issue.

> On Apr 21, 4:26 am, FND <[email protected]> wrote:
>>> not just 'eval'... custom macro handlers, toolbar handlers, hijacks,
>>> etc... can also get invoked within the scope of a locally-declared $
>>> (...) alias
>>
>> I don't believe this is correct - please take a look at this test  
>> case:
>>      http://fnd.lewcid.org/tmp/alias_scope.html
>>
> As your tests illustrate, understanding and recognizing the current
> scope of $(...) can be difficult, especially when considering the use
> of hijacks, plugins, inline scripts and third-party libraries.

I do feel we may be being overly cautious, and if there is scope  
leakage then it will help refactoring and plugin authors if we  
understand the problem better and have regression tests to follow.

At the moment I can't help feel that our not fully understanding the  
issues is leading to classic cargo-cult programming, and not in the  
good sense.

The answer has to be to develop more test cases for such scenarios.

> Even with these tests, it's still not clear to me when the scope of $
> would be problematic and when it would be OK.

Again this cries out "more test cases"!

> In any case, keep in
> mind that TiddlyWiki is not just an open source application... it's an
> open source *development platform*... thus, while it might be possible
> for us to do the work to avoid a $(...) scoping problem within the
> core code, there is still a great potential for conflicts with other
> code that could create a major burden for anyone else attempting to
> develop new features.

I think I see this differently. As I understand it, the problem stems  
when plugins introduce other frameworks which use "$".

We can work-around, and in the worst case, I still see it as the duty  
of the developer of a plugin to work-round the clash, as it would be  
if they introduced something which clashed with another existing core  
library function.

> Except for the core team, we are already facing a paucity of
> TiddlyWiki developers in the community (primarily because of the
> learning curve and lack of core API documentation).  Creating
> additional complexities (i.e., needing to comprehend the $(...)
> scoping issue) will simply discourage yet more people from even
> attempting to learn how to write new things for TiddlyWiki.

Again I see this a quite different issue. One could argue that by  
making TiddlyWiki more open and friendly to jQuery plugins and  
developers we'll expand the TiddlyWiki community of plugin authors.

I suggest we continue to use the jquery alias, build more tests for  
"$" and consider flipping to "$" once we understand the problem  
better. I think at this point adding TiddlyWiki special "jq" alias  
will make matters worse, and only add yet another thing we are  
committed to maintain for backwards compatibility.

Paul (psd)
--
http://blog.whatfettle.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to