On 9/27/06, Mark Guzman <[EMAIL PROTECTED]> wrote:
A.J.Mechelynck wrote:
> Yes, I never said anything else: "...the scripts... terminate early
> and with error...". It surprised me because, after all, Vim doesn't
> need to be a C compiler to run ccomplete.vim, or a Web browser (hiding
> tags, the whole <HEAD> part, and OTOH showing clickable <A HREF=...>
> links and graphical <IMG> pictures) to use htmlcomplete.vim. Executing
> a script and editing it are two different things.
My other message covered the reason for the requirement. C as a language
does not provide introspection, python and ruby do. The most effective
completion (for ruby) comes from asking the ruby interpreter itself
"what do you know about X". I will probably add a fail-over to syntax
completion as someone else mentioned. I wonder how microsoft manages
their completion system, I'm of the belief that they are also using
introspection (probably in some sort of sandbox).

For obvious reasons, I'm going to side with Mark here.  You can claim
that "vim doesn't need to be a C compiler to complete C" - that's like
comparing cats and potatoes.  C and C++ have inheirant type
information directly in the code itself.  Header files are included
verbatim, and easy to parse (when needed).  Also, with regards to C,
all completable symbols are top-level  and require no extra scoping.

Let's take a look a python.  Tell me how you would gather the
information from the "sys" module in order to complete it.  Sure you
could run through all of sys.path.... oh wait! no... somehow you'd
have to determine the path python WOULD use to find the module, find
the .py file (assuming you don't have a gimped install containing only
pyc files), and parse that.  Sure it's possible, and sure, it might be
easy for "sys" - but take a look at pygtk.  Tell me how long that
would take to parse.

Now, go to a terminal, type "python" and hit enter. Then type "import
sys; dir(sys)" - tell me which was:
a) faster
b) easier
c) less error prone
d) guaranteed to work on all python installs



It would be nice if I could access the spelling/underlining stuff to
provide syntax error information. I haven't look too hard yet to see if
this is possible, but I for one would find it useful.

> P.S. Is that really your mail address? Looks bogus to me. But then if
> it were, you shouldn't stay long on the mailing list...
Yes, it is indeed my email address, though I have a few aliases that are
a bit more "formal". I am quite the trouble maker. I'm sure you can
imagine that my address does not validate on many websites, apparently
.info domains aren't valid in most peoples eyes.
  --mark


--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info


Reply via email to