On Wed, Oct 10, 2012 at 3:49 PM, Eddy Cizeron <[email protected]> wrote: > 2012/10/9 Sebastian Sylvan <[email protected]> >> I think there are two other benefits. The first is intellisense/code >> completion. Type "foo." and get a list of all methods in scope with a >> matching self type. This can be a massive productivity boost as it >> basically puts all your code and documentation in the IDE in a context >> sensitive way. Much harder to do this if you have to remember the name >> of the method before you see anything. > > I agree that it's easier to start from a variable existing in the context > rather than from a namespace or from a function name. But completion does > not necessarily have to insert code after the considered identifier, even if > it is indeed more usual.
That would indeed be pretty unusual. Worse, it's how you write code normally. If function applications start with the name of the function and not the variable, then you have to decide before you even start that you want to invoke the "code completion feature" on this next expression, *skip* writing the function name (or put in some kind of placholder) and instad write the variable you want to act on combined with some magic incantation to make the IDE let you select and then pre-inject the function name in front of it. In an OOP style syntax you just write code like you're used to and the IDE just discretely flashes up little tool tips and lists of members to gently nudge you along your way (or allow you to short cut some typing) as you go about your normal coding. You don't need to do anything special, it's just constantly there if you need it, and can be ignored if you don't. I really can't stress enough what a force multipler it is to write code in an IDE with powerful code completion for someone who has internalized it into their workflow. I know real men use VIM etc., but I'm secure enough to admit that I am more productive in the actual coding phase using C# with Intellisense in VS than Haskell + Emacs or whatever, even though I recognize that on language merit alone it should be the other way around by far. Tooling matters so much these days. Arguably more than a lot of language semantics, and certainly more than worrying about slight syntactic redundancy, IMO. -- Sebastian Sylvan _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
