I've already done some work to improve the readability of variable
names, you'll see the results of that in jQuery 1.2.1.

But, as far as the second and third points go, we don't plan on making
changes in that respect, any time soon.

In the future, you should makes posts like this to the jQuery dev list:
http://groups.google.com/group/jquery-dev

--John

On 9/16/07, kuralj <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I really like jQuery's API but find the libraries source code
> difficult to read.
>
> For example:
> - Short var names
> - Ommission of braces and heavy use of shorthand if(), for() blocks
> - Nested ternary operators, some of which transcend several lines
>
> Does anyone know if there are plans to improve the readability of the
> source code going forward? Am I alone in thinking the source code is
> difficult to read? (I don't mean it's overall construction, I like
> the  methodology, just the fine grain stuff mentioned above)
>
> The main problems I have are that the short var names make it hard to
> follow the code and the shorthand block statements make it tedious to
> insert logging / debug statements into the core when deconstructing
> how something works.
>
> With javascript packers, is it really necessary to have uncompressed
> source code like this?
>
> if ( m && (m[1] || !c) ) { ... }
>
> return ( t.constructor == Array || t.jquery )
>         ? jQuery.inArray( a, t ) < 0
>         : a != t;
>
> Please don't think that I'm having a dig at jQuery here :) I'm just
> curious what others think as I find this to be the biggest reason why
> I haven't utilised the library on any large scale work as yet.
> Essentially, I'm reluctant to rely on a library that I find hard to
> read and deconstruct.
>
> Cheers,
>
> Ian
>
>

Reply via email to