Re: Good editor for Linux?
On 2007-04-24 18:48, James Kanze wrote:
On Apr 24, 10:54 am, Erik Wikstr?m <eri...@student.chalmers.se> wrote:
On 24 Apr, 09:38, James Kanze <james.ka...@gmail.com> wrote:
[...]
Then you still have to look them up. Or does auto completion
also ensure that you have the right number of arguments, with
the right types, and that all of the additional constraints have
been met? (Things like not passing a null pointer if the
function says it's forbidden.)
I don't think that auto completion is a real help here.
Well, that depends on what you mean by autocomplete, when I use the
term I think of what MS calls Intellisense, which in fact gives you
the number and type of arguments for methods.
In my source code? I'd just have to delete them then. You must
mean something else.
Sorry, but it seems like we've lost lost each other somewhere along the
way, because I can't figure out what you are talking about :-)
What's important as a
programmer is that you know that there is a method that does what you
want, and if you have an idea about the name that's just a bonus.
That's more a feature of your help, or whatever. If you know
(or even think) that there's a function which does what you
want, you'll want to see its documentation to be sure before
using it.
I was more thinking about cases where you are not sure if the function
is called Foo(), OnFoo(), or DoFoo() or what the order of the
arguments are.
I'm not sure about what you're describing. If you don't know
even the beginning of the function name, what do you type in to
get the completion? Are you saying that if I type Foo, then
request autocompletion, the editor will replace it by OnFoo, if
that's what the function is called?
I think I see where the confusion is coming from. You are talking about
simple autocompletion where the editor deducts what you are going to
type and fills it in for you whereas I'm talking about something more
advanced. As an example consider this piece (incomplete) of code:
std::vector<int> vec;
vec.
Now, Visual Studio it knows that vec is of type std::vector<int> and
what members it has, so as I type the '.' a list appears with all the
members, and as I start typing the word 'insert' (in this case as soon
as I type the 'i') insert will be selected in the list. When the member
I want is selected I press Enter without typing the whole name.
Next as I type the opening parenthesis I get a tool-tip telling me that
there are 3 overloaded versions of this function and the first has the
signature 'vector<_Ty,_Ax>::iterator insert(vector<_Ty,_Ax>::iterator
_Where, const _Ty& _Val)', using the arrow-keys I can get a tool-tip
describing the other versions of insert.
When writing C# Intellisense is even smarter and can deduct a lot more
and you can write very long lines typing only a few characters.
--
Erik Wikstr?m