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

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sun Jan 28 16:02:36 UTC 2018


On Sunday, January 28, 2018 00:27:51 H. S. Teoh via Digitalmars-d wrote:
> 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.

Comparing vim to notepad would be a comparison that I don't understand at
all. Even if you're just talking really basic commands, it makes notepad
look like a typewriter. If anything, I would have compared IDEs to notepad
due to how poor their code editing capabilities are. IDEs add lots of nice
tools for refactoring code and the like, but their actual text editing
capabilities tend to be only a bit above notepad. This reminds me of this
old stackoveflow question:

https://stackoverflow.com/questions/2695919

> 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.

LOL. One of the reasons that I hate python is that I can't hop between
braces in it in vim, because it has no braces. It makes jumping from the top
of a function to the bottom a lot harder. Even Pascal has begin and end
(which I found out that vim understands when I was mucking around with some
stuff in Pascal several months ago).

> > 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.

LOL. You should read the grammar specification for Java. It has the longest
identifier names I have ever seen. It just seemed so sadly perfect that
Java's own grammar specification had ridiculously long identifier names.

I think that overall D has struck a good balance with identifier names, but
that's always a bit subjective - e.g. there was a rather long bikeshedding
thread once where some folks complained that Clock.currTime wasn't
currentTime or now. I'd always kind of assumed that if someone were going to
complain about it, they'd start arguing about how many r's it had, not that
I shouldn't have abbreviated an obvious word.

> > 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.

The only plugin that I really use at this point is minibufexpl, which shows
your buffers at the top of the window. It does allow you to then navigate
them with the mouse, but I mostly just use it so that I can see which
buffers I have open and which I'm on. I don't even use ctags, and I
certainly don't use anything like dscanner or dcd. I probably should find
more plugins to boost my productivity, but I also should spend more time
leaning stray vim commands - just like I should spend more time learning
stray *nix commands. There are so many capabilities there that I barely use
or don't even know about. I suspect that most vim users use less than 5% of
its capabilities given the insane amount of stuff it can do without getting
plugins involved at all.

But even if I were to heavily use plugins, it wouldn't be like an IDE at
all, because it would actually have good text editing capabilities. _That_
is my biggest complaint about any kind of IDE. Their text editing
capabilities always seem primitive in comparison to vim. In the past, I've
tried to use vim plugins for IDEs, and that helps, but they never seem to
work quite right, and ultimately, I end up just using vim.

I have yet to find an IDE where I didn't feel like I was playing with
primitive tools in comparison to vim. And as such, it's that much weirder to
me for someone want to use an IDE. But it _does_ take quite a lot to learn
vim. Starting out with it was a lot like when I first switched to dvorak.
For a while, I could barely type at all. And I suspect that it's that first
encounter with vim or emacs where it feels like you have to fight them to
even get what you can get out of notepad is why more folks don't use vim or
emacs. But a lot of programmers do eventually end up with one or the other
in spite of that.

> 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.

Learning a new language is always a bit of work, but once you understand the
underlying concepts and have use a language or two, it's generally
straightforward to learn a new language. Part of my problem is that when I
actually want to learn a language, I tend to want to learn it through and
through, not just enough to get by, and that takes a lot more effort. On
that basis, I don't know something like python worth anything, but I've
written a number of smaller python programs before.

If anything, the fact that I found D has pretty much ruined me for really
learning new languages. Before, I would use a new language for all of my
projects for a while - kind of like you do better with a new human language
by immersing yourself in it and dealing with everyone in the new language
for a while. But after learning D, I don't want to do any of my projects in
anything but D, so I never end up immersing myself in any new programming
languages. I probably should find more time to spend on messing around with
and learning new languages, since that can often be helpful in becoming a
better programmer (especially if they use a different paradigm), but I have
so much else to do that I haven't.

> 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).

As we've discussed before, this is one area where we don't agree at all. I
find it incredibly annoying when I don't have syntax highlighting. But I see
no reason why that shouldn't be up to the user just like what the colors are
should be up to the user.

> 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*

LOL. There's some truth to that, but this reminds me about a talk talking
about how every generation complains about attitude problems of the next
generation - frequently with pretty much the same complaints. So, I think
that to some extent, those sort of complaints boil down to complaining about
how the young whippersnappers don't know anything. ;)

Either way, I've seen a whole range of what programmers do and prefer in
their code editors. The youngest programmers do tend to use the standard IDE
for a language (in which case, many of them would initially feel a bit lost
with something like D), but that's often just a question of them not having
found something better yet. For many of them, even if they don't end up with
vim or emacs, they'll end up with something like sublime or notepad++. And
yes, some do stick with IDEs, but a lot don't. I think that part of that
tends to depend on the programming language or OS that's being used.

Personally, I picked up vim in college, and never looked back - and I'm in
my mid-thirties, so I'm sure not 20 anymore, but I'm still very much on the
younger end of the spectrum, and I'm a diehard vim user. LOL, I ended up
using latex for papers in school just because then I could use vim, because
the text-editing capabilities of stuff like FrameMaker or OpenOffice sucked
in comparison. And I've done stuff like hook vim into my e-mail client so
that I can type my e-mails (including this one) using vim. Using other
editors feels like being stuck in the stone age. And for me, personally,
IDEs simply can't compare to vim.

It is true though that most of the core developers around here favor editors
like vim or emacs and would prefer to focus their efforts on the language
itself or libraries rather than on plugins for IDEs and whatnot, which is
part of why D's IDE support isn't as good as some folks would like - the
other big component being the lack of a company paying for folks to work on
IDE support. I think that in general, that's how you end up with IDEs with
first class support for a language. Sometimes, volunteer work will get you
there, but that doesn't seem to be how it usually comes about - not from
what I've seen in other languages anyway.

But there are a few folks like Rainer who put in a lot of time and effort on
IDE-related support and tools.

- Jonathan m Davis



More information about the Digitalmars-d mailing list