On Jan 16, 3:17 pm, Miller Medeiros <[email protected]> wrote:
> Can you imagine how hard it is to determine what should happen and what is 
> the execution context when you have different engines, code branching based 
> on features/environment and millions of different patterns for encapsulation, 
> inheritance, etc?

Yes.

> Building tools for static languages is easier since you have way more 
> metadata on the code and an stricter structure.

Yes

> The same way that is way easier to create a XML parser than an HTML parser.

No, this analogy does not fit XML/HTML are not programming languages.
Plus the rules for parsing HTML are well defined and don 't need a run-
time check.

> Using the last example as a reference, what should the IDE autocomplete or 
> error check in this case:
>
> > o = new (function(){
> >  try { f() } catch(_){ return A }
> >  return B
> > }())
>
> `o` could be an instance of `A` or `B` and the IDE have no idea if both 
> implement the same interface or inherit from the same objects... - I agree 
> with JSLint in this case: "weird construction".

Auto-completion for "o" would be the decorated Union of A | B;

In the drop down I would expect to see something along the lines of:

A :: .foo()
A :: .bar()
A :: .toString()
B :: .foo()
B :: .bar()
B :: .toString()
...

> and if you have mixIns of dynamic objects?

When you use a mixin, you've created a new type as far as auto-
completion is concerned.

> and if the objects you are using are stored on a different JS file from a 3rd 
> party library loaded dynamically?

Irrelevant, the 3rd party script can be parsed just as well. The only
difficulty would be meta-tricks with properties pulled from IO an as
they cannot be resolved statically (usually). The examples you've
given though don't fall under that category.

> type inference and dynamic code evaluation solves many problems but still a 
> small part of the whole problem. -  if anyone ever seen what VisualStudio is 
> capable of doing for C# and what FDT and FlashDevelop does for ActionScript 3 
> you guys know what I mean... I really like JavaScript but sometimes I miss a 
> good IDE.

Aptana, Komodo, Netbeans...

Certainly these don't measure up to Visual Studio in features, but at
least they don't use regular expressions to parse JavaScript code as
VS does....

The biggest problem is that there hasn't been a significant effort in
this space yet IMO, not due to some inherent difficulty in the
language.

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to