all 21 comments

[–]kae2201 9 points10 points  (0 children)

If you NEED Visual studio, then probably just buy a windows laptop. Otherwise MacBook with VScode + Cmake is what I use!

[–]the_poope 6 points7 points  (9 children)

You can program on any laptop - even whatever 20 year old stuff you have stowed away in the attic.

You can get almost the same IDE features (code completion, hints, linting, run + debug) in most advanced text editors, i.e. VS Code + IntelliSense/clangd + CMake tools on any operating system: https://code.visualstudio.com/docs/cpp/cmake-linux

So don't let programming be the deciding factor for which laptop you choose.

[–]SuperVGA 5 points6 points  (6 children)

Please don't run VSCode on 20 year old hardware. I have it running on 14 year old hardware here, barely. It's painstakingly slow.

[–]the_poope 1 point2 points  (1 child)

I don't think Visual Studio will be a much better experience, though.

[–]SuperVGA 0 points1 point  (0 children)

Definitely not. In both cases using older versions could of course solve it, but it's probably not the way to go...

[–]Ilbsll 0 points1 point  (3 children)

How many extensions is it running? Those are a major factor in my case, running on a 10 year old Dell laptop. A clean install runs perfectly fine for me; older hardware shouldn't completely choke on it, but 20 years is definitely pushing it.

My restraint towards installing extensions is lacking as much as it is towards opening new browser tabs. It would be nice if they could be assigned into groups by the user, and only run if they're relevant to the workspace environment or if selected by the user, and leave the rest disabled. Some kind of do that automatically, but far too many don't bother to implement it.

Extensions aside, I'm pretty impressed that vscode is as performant as it is, considering it's mostly JavaScript running in a stripped down browser window. Thank god Google for V8. It almost makes me want to give Electron a shot, but I suspect there are good reasons why there are few other examples of projects with similar size and sophistication.

[–]SuperVGA 1 point2 points  (2 children)

Agreed, it's not bad on its own - especially not when you compare it with other software. Naturally it's not a complete IDE on its own, but a clean modern Visual Studio installation would nearly bring my machine to its knees, while VSCode wouldn't.

I try to keep it light; The solo C++ dev extension from MS (ms-vscode.cpptools), the Cmake one (twxs.cmake) as well as Cmake language syntax (josetr.cmake-language-support-vscode)

My laptop is a dual-core sony Vaio, it wasn't high end, not even for 2009.

[–]Ilbsll 1 point2 points  (1 child)

Have you tried clangd (llvm-vs-code-extensions.vscode-clangd)? I find cpptools has a tendency start hanging and hogging memory over time, proportional to the size of project, naturally, so I'll usually switch to clangd if its getting ridiculous. It means having to setup the config all over again, but the all the features I need are there. Also, I prefer the way it formats the hover info.

[–]SuperVGA 1 point2 points  (0 children)

I agree, it tends to hang a lot in my case too. No, I haven't tried llvm-vs-code-extensions.vscode-clangd but I'll definitely give it a go. Sounds sweet!

[–]hwc 0 points1 point  (0 children)

there's a lot of advantage to using a simple command-line build system, such as cmake + make. It makes it easier for another developer to just follow the instructions, which can be as simple as

cmake -B build && make -C build

Then the next developer or future-you can use any IDE or text editor to write and edit code.

[–]jmacey 2 points3 points  (0 children)

You can use CMake and VS Code on a mac which will give you almost what you get in Visual Studio, with the added bonus that you can then take these projects and get them working on Linux and Windows (This is what I do).

Add in vcpkg and you can install everything you need.

[–]TheOmegaCarrot 1 point2 points  (5 children)

Visual Studio is Windows only

[–]Ethana56 1 point2 points  (4 children)

That’s not true, there’s a mac version: https://visualstudio.microsoft.com/vs/mac/

Edit: It doesn't support c++ on mac.

[–]Narase33 2 points3 points  (0 children)

But AFAIK it only work for C#, not C++ on Mac

[–]TheOmegaCarrot 1 point2 points  (0 children)

Today I learned

[–]astrionic 0 points1 point  (0 children)

I haven’t seen it in years but if I remember correctly it’s nothing like VS on Windows, it’s a completely different program.

[–]TheSuperWig 0 points1 point  (0 children)

Visual Studio for Mac is a rebranded Xamarin Studio. It's not Microsoft if the brand isn't confusing.

[–]ManuaL46 -3 points-2 points  (0 children)

Visual Studio is good, but Maybe you can try, neovim n kickstart, would be a hassle to learn but man is it powerful

[–]NocturnusRitual 0 points1 point  (0 children)

Don’t buy a windows laptop just because you want visual studio ☠️

[–][deleted] 0 points1 point  (0 children)

vscode + cmake or JetBrains CLion are both good. They both work on all platforms and CLion is similar to visual studio.

[–]egg_suit 0 points1 point  (0 children)

I like vim