News for hackers. Stuff that matters.
Re:The type system is a programmer's best friend by noveltyaccount on Saturday November 05, 2022 @01:15PM (#33483409)
When I graduated college in the '00s I thought Vim was the most amazing thing I'd ever learned. Then a colleague at my first job showed me what happend when you typed . after a variable name in Visual Studio. Code completion, inline documentation...my mind was blown, and I never looked back. When I meet a young chap extolling the benefits of Vim or Emacs or really anything that doesn't have stepped debugging and code competition...well, there are no bonus points for doing things the hard way.
Re:The type system is a programmer's best friend by constantcrying on Saturday November 05, 2022 @01:24PM (#33483502)
Vim is not really an editor. It is a way to edit text, you can use vim in almost any environment. You are also totally wrong about vim or emacs not having code completion, that is just nonsense.

I use (a version of) visual studio, the first thing that I did was installing a vim extension.

Also vim itself already supports almost any of these features with some basic plugins for the completion logic. If I type "." in my vim I get the same thing I would in visual studio. If you are saying "vim is bad because it lacks X IDE feature" you are missing the point.

Re:The type system is a programmer's best friend by Our_Benefactors on Saturday November 05, 2022 @03:57PM (#33485019)
Vim: I can do that too, I swear! Just configure some plugins, can’t tell you what they might be though. But I’m turing complete, and I’m the best!

VScode: Of course I can do autocomplete bud. Here, search my package repo, I’ll tell you which plug-ins are the most popular and handle the entire download and install process for you.

There’s no comparison.

Re:The type system is a programmer's best friend by yellowapple on Saturday November 05, 2022 @04:34PM (#33485377)
Visual Studio: Of course I can autocomplete! Hold my beer while I bring your machine with 16 cores and 64GB of RAM to its knees for multiple minutes ;)
Re:The type system is a programmer's best friend by Our_Benefactors on Saturday November 05, 2022 @04:43PM (#33485475)
This is just false. Does it have a higher memory/cpu footprint than vim? Sure. But VScode is plenty performant.
Re:The type system is a programmer's best friend by yellowapple on Saturday November 05, 2022 @05:04PM (#33485722)
VSCode != Visual Studio
Re:The type system is a programmer's best friend by nmarinov on Saturday November 05, 2022 @06:50PM (#33486771)
Have you tried the latest couple of releases?

I used to have that issue 5 years ago but since then it opens under 5 seconds and loads the solutions I need for not much more. Currently using it on a cheapish recent windows laptop but even on a 8gb x220 it works fine, just loads for 30 sec in the beginning and then it's smooth.

Granted I'm only opening .net solutions with under 100 projects each but anything above that is unnecessarily more difficult to navigate with just vim.

And in my experience VSCode is many times slower than Visual Studio on the same projects. None of them are as fast as barebones sublime or vim on an m1 mac but when I load the latter with plugins it's not a huge difference.

Re:The type system is a programmer's best friend by constantcrying on Saturday November 05, 2022 @04:05PM (#33485093)
Why do you even reply to a post that you didn't bother to read? VScode is a neovim frontend.

>There’s no comparison.

Read the first line of my post. There literally is no comparison, because there is a category error.

Re:The type system is a programmer's best friend by Our_Benefactors on Saturday November 05, 2022 @04:13PM (#33485169)
> Why do you even reply to a post that you didn't bother to read? VScode is a neovim frontend.

I did read your post Mr. snark.

> There literally is no comparison, because there is a category error.

Pure pedantry. VScode takes far less effort to get a high quality feature set when compared to vim. That’s the only point of debate that matters for most people.

Re:The type system is a programmer's best friend by za3faran on Saturday November 05, 2022 @04:44PM (#33485489)
I think OP wanted to make a categorical difference between vim-the-editor vs vim-motions. The latter of which are supported in all major IDEs as plugins/extensions.
Re:The type system is a programmer's best friend by aidos on Saturday November 05, 2022 @08:34PM (#33487465)
They’re different experiences for users with different priorities.

Your priority is evidently ease of configuration, VScode is definitely easier out of the box - there is no comparison.

My priority is hackabilty for streamlined editing and code navigation. Here neovim run circles around vscode.

Neither is “right”, just different preferences. Note that I’m not here to tell you my editor is better, I personally enjoy using it more, and that’s enough for me.

Re:The type system is a programmer's best friend by throwaway675309 on Sunday November 06, 2022 @01:40AM (#33489482)
"My priority is hackabilty for streamlined editing and code navigation. Here neovim run circles around vscode."

I hear this line a lot from hard-core vim users, but it's always talked about in the general. I'd like to hear a specific use case and exact scenario where a common workflow is faster in neovim over a more full featured IDE like JetBrains or Visual Studio.

Re:The type system is a programmer's best friend by aidos on Sunday November 06, 2022 @05:21AM (#33491077)
Little mini example in terms of LSP behaviour is fixing this bug:

https://github.com/microsoft/TypeScript/issues/37816

I edit the results of gotoDefinition on the way through so I always jump to the one I want.

Re:The type system is a programmer's best friend by tsimionescu on Saturday November 05, 2022 @01:23PM (#33483490)
Note that Emacs had these features and more for Lisp since about the 1990s or even earlier, while being free.

Now, for C or Java or most other popular languages, you're absolutely right.

Re:The type system is a programmer's best friend by pcthrowaway on Saturday November 05, 2022 @01:29PM (#33483554)
For the people responding to you who are saying you can get all the same things in vim, they're right of course, but a lot of this modern functionality is now built on top of the Language Server Protocol[1], which is an open standard created by microsoft for VS Code.

Kudos on the people who have ported this to Vim[2], but I suspect the support for LSP features will still be better in VS Code

[1] https://microsoft.github.io/language-server-protocol/

[2] https://github.com/prabirshrestha/vim-lsp

Re:The type system is a programmer's best friend by jrumbut on Saturday November 05, 2022 @02:01PM (#33483941)
Code completion, search, cross referencing, and all sorts of other features in vim, emacs, and all kinds of other editors (including Visual Studio) predate LSP by decades.

LSP is cool though, an advancement certainly, but it is not a completely new thing.

https://en.m.wikipedia.org/wiki/Ctags

Re:The type system is a programmer's best friend by jcelerier on Saturday November 05, 2022 @08:08PM (#33487301)
If you think ctags or rtags are even remotely comparable to what an actual IDE brings you you have absolutely never used more than 10% of what an IDE with semantic understanding of your code can do
Re:The type system is a programmer's best friend by jrumbut on Monday November 07, 2022 @05:21PM (#33513395)
The post I replied to brought up a very narrow set of features that had been available in vim for a long time.
Re:The type system is a programmer's best friend by jcelerier on Monday November 07, 2022 @07:04PM (#33514334)
it brings up "Code completion, search, cross referencing, and all sorts of other feature" and again, those work much less well in ctags / rtags than with a proper IDE
Re:The type system is a programmer's best friend by abraxas on Saturday November 05, 2022 @03:16PM (#33484664)
Kind of a perpendicular discussion but it amazes me that with this language server thing hipsters turned what was a very mature and proven pattern (a plugin architecture) into a distributed software problem. My god talk about doing shit the hard way...
Re:The type system is a programmer's best friend by quicklime on Saturday November 05, 2022 @04:15PM (#33485177)
The plugin architectures that I've seen require plugins to be written in the same language as the IDE. For example, Eclipse plugins need to be written in Java.

Language servers run in a separate process to the editor, and they communicate over JSON-RPC. The nice thing about this is that the language server can be written in any programming language - which usually ends up being the language of the code being edited, rather than the language that the editor was written in.

This makes it a lot easier for language servers to be written and maintained by the people who maintain the compilers for those languages, e.g. gopls is written by the Go developers, clangd is part of LLVM.

Re:The type system is a programmer's best friend by morelisp on Saturday November 05, 2022 @06:45PM (#33486734)
LSPs turn a M*N problem into an (ideally) M+N problem. You can't do that with any existing single editor's plugin architecture, basically by definition.

Ctags is a better analogy, and LSP has fairly obvious advantages compared to it.

Re:The type system is a programmer's best friend by maxbond on Saturday November 05, 2022 @01:24PM (#33483498)
Just so you know, you can do those things in vim now (I do), and the whippersnappers may well be.
Re:The type system is a programmer's best friend by sidlls on Saturday November 05, 2022 @01:29PM (#33483552)
emacs has plenty of plug-ins that turn it into an IDE. For people who are already comfortable with it, these tools are great. I’m more productive in it than with “modern” tools. For newcomers the learning curve is going to be steeper. I’d recommend learning at least either vim or emacs (or perhaps other text-based editors with similar features, if they exist) though, as it does provide versatility for oneself. Those GUI IDEs aren’t available in every environment where one might want to code or debug.
Re:The type system is a programmer's best friend by rleigh on Sunday November 06, 2022 @06:38AM (#33491522)
> I’m more productive in it than with “modern” tools.

Are you objectively more productive, or do you perceive yourself to be more productive?

I was an Emacs diehard for nearly two decades. Then I got introduced to CLion. In retrospect, Emacs was an inferior tool.

While it's certainly true that Emacs can be configured and extended to do all sorts of interesting things, I do suspect many of its users are deluding themselves when it comes to the sheer breadth and depth of functionality offered by a modern IDE. It also doesn't help that its maintainers are living several decades in the past, and haven't kept up with what the "competition" are doing.

I'm certainly not implying that Emacs is a poor editor. Very few IDEs have text editing capabilities on par with that. But its integration with other tools doesn't hold a candle to today's IDEs.

Re:The type system is a programmer's best friend by czx4f4bd on Saturday November 05, 2022 @01:22PM (#33483470)
Both Vim and Emacs have plugins for intelligent code completion and viewing inline documentation. I personally prefer to use VS Code or Jetbrains IDEs with Vim emulation, but I've seen setups for both Vim and Emacs that basically made them into full-fledged IDEs.
Re:The type system is a programmer's best friend by SAI_Peregrinus on Saturday November 05, 2022 @04:44PM (#33485482)
Full-fledged Plugin-based development environments. An IDE is an Integrated Development Environment; it comes with the features necessary for efficient development built-in.
Re:The type system is a programmer's best friend by _qua on Saturday November 05, 2022 @02:30PM (#33484234)
When I was a kid learning to code, programming books recommended stridently against even using syntax highlighting. It's funny how helpful things get rejected by people who "did it the hard way."
Re:The type system is a programmer's best friend by jlarocco on Saturday November 05, 2022 @03:35PM (#33484798)
> When I meet a young chap extolling the benefits of Vim or Emacs or really anything that doesn't have stepped debugging and code competition...well, there are no bonus points for doing things the hard way.

I can't speak for Vim, but Emacs has stepped debugging, code completion, etc.

Part of the reason I use Emacs is that I get those features and (and a ton more) with the same light weight interface across multiple languages and platforms. At the same time, it's usually very easy to make Emacs work with third-party tools. At work, for example, I spend most of my time in Emacs, but can easily switch to the MSVC++ debugger when I need it. It's the best of everything.

Meanwhile, I get to listen to my coworkers celebrate new features in VSCode that I've used in Emacs for years...

There are no bonus points for learning a new IDE for every project, either.

Re:The type system is a programmer's best friend by throwaway2037 on Sunday November 06, 2022 @02:45AM (#33490185)
You wrote: <<There are no bonus points for learning a new IDE for every project, either.>>

I'm confused. The point of uber-IDEs (IntelliJ, Eclipse, NetBeans, VSCode): You only need to learn one IDE. Each language is just another plug-in.

Re:The type system is a programmer's best friend by titzer on Saturday November 05, 2022 @03:45PM (#33484884)
Wait until you learn about these 2002 technologies called "extract method", "inline method", "encapsulate fields", "extract interface", "extract local", "inline local", "rename", plus about 200 code inspections...
Re:The type system is a programmer's best friend by christophilus on Saturday November 05, 2022 @03:56PM (#33485004)
I remember using Visual Studio in college (back in 1999, 2000) and coding circles around folks who were using text editors.

These days, I use Neovim + LSP for a pretty decent approximation of an IDE-- it's quite good. Still not as good as Visual Studio + C#, but I'm on Linux now, and not writing C# anymore, and I definitely prefer an open-source, general purpose, light-weight, customizable editor.

Re:The type system is a programmer's best friend by yellowapple on Saturday November 05, 2022 @04:32PM (#33485351)
Emacs (with e.g. company) can do much of the same, without my laptop making a fighter jet sound quiet in comparison :)
Re:The type system is a programmer's best friend by outworlder on Saturday November 05, 2022 @06:08PM (#33486411)
> When I meet a young chap extolling the benefits of Vim or Emacs or really anything that doesn't have stepped debugging and code competition...well, there are no bonus points for doing things the hard way.

Why do you think they are doing things "the hard way"? Emacs can have all the things you have described. And it can do that for languages that are not part of the .NET Framework, they just have to have a language server implementation.

The problem with "IDEs" was placing all your eggs into a single basket. You are on Visual Studio and then you need to do some Java(or Scala, or whatever). And now you have to get another IDE. Some tried to be one IDE to rule them all (Eclipse, Netbeans), didn't work all that well.

You need a good editor - most IDEs don't have one. You need integration with your language of choice. You need compilers and linters and a bunch of other things. Better to glue components that do one thing and do it well, than having one IDE trying to do everything. And those components can fell just as integrated.

Re:The type system is a programmer's best friend by closeparen on Saturday November 05, 2022 @06:41PM (#33486701)
>Why do you think they are doing things "the hard way"? Emacs can have all the things you have described

In the first few years of my career I would try every few months to get these things actually installed and working in emacs. It was definitely the hard way.

>The problem with "IDEs" was placing all your eggs into a single basket

Eclipse is a uniquely terrible piece of software and I understand why it might polarize people against IDEs for life. The JetBrains products are pretty good and, importantly, modular and consistent enough across languages that I don't mind.

Re:The type system is a programmer's best friend by aidos on Saturday November 05, 2022 @08:41PM (#33487508)
I believe they’re talking about a different “hard way” in that they’re suggesting you can’t have those features in vim / eMacs etc and have to do something else instead.

You’re not wrong, configuring these editors is 100% the hard way (that doesn’t stop me from doing it though).

Re:The type system is a programmer's best friend by MrJohz on Saturday November 05, 2022 @06:39PM (#33486679)
IntelliJ and VSCode have both worked pretty well with anything I've thrown at them, I'd consider them both fairly successful as IDEs "to rule them all". Obviously they're both very different ends of the IDE spectrum, but they've both had intellisense, debugging, type revealing, and refactoring features for all the mainstream languages I've tried with them. VSCode particularly tends to integrate well with LSPs.
Re:The type system is a programmer's best friend by throwaway2037 on Sunday November 06, 2022 @03:02AM (#33490273)
You wrote: <<You need a good editor - most IDEs don't have one.>> Can you name any?
Re:The type system is a programmer's best friend by aidos on Saturday November 05, 2022 @08:39PM (#33487495)
Everything is pretty much just language servers behind the scenes these days anyway. Neovim supports those natively, so those young chaps aren’t talking about your vim of yesteryear.
Re:The type system is a programmer's best friend by flippinburgers on Sunday November 06, 2022 @03:08AM (#33490311)
I am older than you and use neovim. It has code completion thank you very much.
Re:The type system is a programmer's best friend by Viliam1234 on Sunday November 06, 2022 @08:19AM (#33492275)
> there are no bonus points for doing things the hard way

Perhaps not from the technical perspective, but there are social advantages if you are a member of a clique that does things the hard way and considers it a sign of competence. ("Any idiot can write a code that compiles using autocomplete and syntax highlighting, but it takes a true master to achieve the same result using a decades-old Linux equivalent of Notepad.") They don't seem to understand that the ancient masters did things the hard way not as a pointless exercise, but simply because the easy way was not available back then.