Dscanner - DCD - Dfix ... Editor support or the lack of it.

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Jan 28 08:27:51 UTC 2018


On Sun, Jan 28, 2018 at 12:03:38AM +0000, Benny via Digitalmars-d wrote:
[...]
> The problem is Teoh that learning a language in Vim or a IDE are two
> totally different things.
> 
> I used to program in Notepad because i grew up with PHP and knew it
> like the back of my hand. The result was very little need to see the
> documentation.  The moment i found PHPStorm, i fell in love. Fast
> function jumping, remote tools, database at your fingertips, code
> checkers and hinters and all the other niceties.

The problem is that people keep equating Vim with Notepad.  It *may* be
true that Vim sucks, but the reason implied by the comparison to Notepad
makes no sense.  It's like saying Windows 10 sux because MSDOS sucked.
It simply doesn't follow logically.


> But for anybody who is not a master of a language or even
> intermediate, a good IDE can make one so much more productive compared
> to the same person just relying on a default notepad type environment.
> The fact that a good IDE expands the methods from a class, it shows
> you the basic help / buildup of the methods calls so you know exactly
> where you write what, without the need to visit the developers
> documentation website.

I learned D from scratch using only Vim, Andrei's TDPL book, and reading
Phobos source code (which is surprisingly easy to read, compared to
other languages' standard lib code *cough*ahem*glibc*sneeze*).  At the
time I started, the online docs sucked, and might as well be
disregarded. Things have progressed a lot since then.

I don't understand the fear of needing to *gosh* open your browser and
visiting the developers documentation website.  I don't hear of people
complaining of needing to take driving lessons in order to get a
driver's license, and here we're talking about *programming* in a
Turing-complete language, which is something FAR more complex than
driving a car ever will be.  But hey, I'm just an outdated old geezer,
what do I know anyway?


[...]
> And for the people who are used to a language, a IDE can still be
> useful by increasing productivity as you simply do ... example "fu"
> ... enter ...  "function " or automated braked closing, or error
> indicators when you forget something so you do not wast your time
> discovering a stupid issue during compilation.

Erm, you do realize that Vim has built-in commands for navigating nested
brackets and parentheses, right? And automatic bracket closing is just a
macro away. You don't even need a plugin for that.


> Its the same issue i personally have with languages that get lazy and
> trow out readability in exchange for less keystrokes. You can at times
> tell what development ides a language uses simply by looking at the
> language.  Everything awkwardly shortcut like "fn" and other shorthand
> ( but what do make it much more brain taxing for anybody new ).

AFAICT, D has a pretty good balance between needlessly unreadably
shortened names like that awful *nix `creat()` or `awk`, and Java's
NeedlesslyVerboseCompletelyRedundantRepetitiousIdentifiers. I personally
prefer shorter names than what D has, but I think what D has does serve
pretty well in terms of being comprehensible to newbies, and still being
typable without giving your wrist an aneurysm. There used to be a couple
of pretty bad names, but IIRC we've weeded them out and replaced them
with better ones by now.


[...]
> As a side note, despite working years in Vim, i still prefer a normal
> but well equip IDE because there are just some things VIM is not good
> at ( unless you customize it to hell with 100's of plugins what tends
> to take years to find your sweet spot and build up the know how to use
> them all perfectly ). VIM with all the plugins is simply a IDE, just
> one where you do not move your hands too much away from the keyboard.

Actually, I hardly use *any* Vim plugins. Maybe just a couple of
standard ones that are already configured by default. But you're right
that it's basically an IDE, if your baseline for comparison is Notepad.
That's something people don't seem to get, for some reason. But oh well.
Their loss, not mine.


> As your example of your colleagues: a IDE where it takes ages to jump
> to a definition in a file, is simply a incomplete IDE. Or maybe those
> colleges have not master the IDE. I know for a fact from myself that
> there is a massive amount of things still "hiding" in Jetbrain there
> products or Visual Studio Code that can make me more productive but
> you learn over time or when you stumble upon it.

The thing about these fancy GUI IDEs is that *somebody* must have
thought of a particular feature and implemented it for you, before you
can use it.  If you happen to need something the developers didn't think
of, you're stuck up the creek without a paddle.  Editors like Vim, OTOH,
provide you an entire editing *language* to build upon; if the defaults
don't have some feature you need, you have the power to add the feature
yourself without needing to hack Vim source code.  It's about empowering
the user to be able to fish for themselves, vs. spoonfeeding them with a
precooked fish (to mangle the proverb a little).

But I suppose the thought of having to do stuff yourself is too scary
for some people, who prefer the world handed to them on a silver
platter.  Oh well, whatever rocks their boat. It's none of my business.


> From my point of view, without a working IDE its much more difficult
> for a non-specific-language to learn and get better at the language.
> And again, VIM with the right plugins is a IDE, simple as that. Its
> annoying that people do not see this. The big difference is that VIM
> is designed around not moving your hand to your mouse and that is its
> major strength.

Yes, being free from the rodent is liberating indeed. It frees up my
energy to actually think about the problem rather than constantly
engaging in "now where on earth is that nested menu with that obscure
option that I can never find?!" and "you mean I actually have to repeat
this series of clicks and mouse wiggles 500 times?! whatever happened to
programmability?".

As far as learning a new language is concerned, though, IMO that has
nothing to do with what IDE or editor you use or don't use.  The idea is
to learn the underlying paradigms and principles in programming
languages in general, which is standard curriculum in universities
AFAIK, and once you understand that, picking up a new language is easy.


> On a side note: The issue i had with the plugins, well one of the
> plugin authors found the issue and it came down to it that the D
> compiler had a regression that effect DCD. I remember mentioning
> before as how many times the compiler ends up breaking code.
[...]

This is why I don't like designing my workflow around reliance on 3rd
party plugins or tools.  My Vim setup is pretty minimal as far as
plugins go; so far I haven't actually used any of the D-specific Vim
plugins, and I don't even bother with syntax highlighting, which I find
distracts my attention from focusing on the programming problem (but I
know this is a very minority opinion).  My philosophy is "do the most
while relying on the least".  It works pretty well both in terms of my
coding environment as well as the code itself -- code tends to be
cleaner, more robust and less bug-prone if written in that way.  It's
slightly harder to get started at first, but once you've built a solid
foundation, the initial invested effort pays for itself many times over
-- the code is more stable, less time is spent debugging, and the code
also tends to be more reusable so subsequent development becomes faster.

I don't expect anyone else to follow my way of coding, though. This day
and age seems to be all about instant gratification, and my philosophy
goes against the grain of that. Let them have their IDEs and eye candy,
it's their business, not mine.  *shrug*


T

-- 
Famous last words: I *think* this will work...


More information about the Digitalmars-d mailing list