Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Mooey Cow
Jan 27, 2018

by Jeffrey of YOSPOS
Pillbug

Hammerite posted:

what? the difficulty of using C++ isn't that it's strongly typed, it's that it forces you to do a lot of your own memory management (the better to give you flexibility and the ability to write extremely performant code), and doesn't come with a lot of conveniences out of the box.

you can have a strongly typed language with a large standard library, for example C#

I would say that the difficulty of C++ has been greatly overstated, probably because of bad teachers who are still teaching some kind of messed up C hybrid. You can easily write C++ without having to care about memory management, especially with the updated standards since C++11, but even before that everyone should have been using RAII and automatic resource management (not just for memory). This was in fact a big reason for inventing C++ in the first place, to solve the large potential for resource leaks in C, and the current recommendation is that in most programs you should never even have to call new() directly. You should care deeply about things like resource ownership and scope though, and it would probably be a lot easier if classes focused on this rather than pointers.

Adbot
ADBOT LOVES YOU

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Modern C++ would be a very elegant and practical language if we could just drop backwards compatibility in a few places.

Muk Dumpster
Jun 27, 2020


Text Here
This is the goons LEARN code thread, you're all talking gibberish rn

Batterypowered7
Aug 8, 2009

The mist that chills you keeps me warm.

Muk Dumpster posted:

This is the goons LEARN code thread, you're all talking gibberish rn

Uh... Malloc() and Calloc()

Scald
May 5, 2008
Probation
Can't post for 26 years!

Muk Dumpster posted:

This is the goons LEARN code thread, you're all talking gibberish rn

Not true. I have to use C++ to program my Arduino, and that's a very approachable entry-level for programming.

Zugzwang
Jan 2, 2005

You have a kind of sick desperation in your laugh.


Ramrod XTreme

MarxCarl posted:

Which is better is just personal preference, so at its core it’s just a nerd fight. It’s been going on since at least the 70’s. Just use what you like and move on.

This has a decent comparison of the 2 https://linuxhint.com/vim_vs_emacs/

TLDR nerds fight over anything. Both have benefits and weaknesses, though vim is superior cause it’s not a bloated freaking operating system and Richard Stallman isn’t attached to it.

Computer viking posted:

These days, I think the emacs/vim animosity is sort of a standing joke; they're both marginal and hardcore enough that it no longer feels like a culture war.

Historically, vim was the "I just want a small text editor that's smart enough to not be annoying to program in" choice. The keybindings have a learning curve, but they allow you do do a lot of text operations very fast when you know them.

Emacs is heavier, though to a degree you won't notice anymore - I think it the joke used to be "Eight Megabytes [of RAM] And Constantly Swapping". What you get for that mind-boggling waste of memory is something vaguely related to a modern IDE: You can have multiple documents (including temporary ones to dump text in for a bit), the UI is kind-of menu and drop-down inspired, and the entire program is written in a real programming language that you can interact with and extend from inside the editor. This means you can write your own macros and give them keyboard shortcuts, for one thing. There are also emacs addons that add things like an email client, a calendar, a (supposedly good) project tracking system, and of course you can use it as a calculator, just to start somewhere.

In modern parlance, vim is kind of towards the Notepad++/Sublime text/BBedit end of things - it edits text well, does highlighting and indentation, and if you're adventurous I guess you can bolt on some form of code completion.
Emacs is somewhat akin to using Visual Studio for everything, I guess? The ability to poke around in the internals and add code while running, and working with your document as data is more unusual (though not something you need to use) - it's kind of a LISP hallmark.

(I use ee as my CLI editor, but can fall back to vim if needed. This gives me about the same street cred as only programming in Visual Basic for Applications.)
Ok so basically I should stick with Vim because I'm not smart enough to get anything extra out of Emacs. :thumbsup:

Computer viking
May 30, 2011
Now with less breakage.

There's a perfectly good argument to be made that emacs is easier to poke around in when you get over the initial hump. But yeah, if you're functional in vim, just stick to that.

hbag
Feb 13, 2021

doom emacs is essentially emacs but with vim controls
so you get all the good bits of emacs and all the good bits of vim

Methanar
Sep 26, 2013

by the sex ghost
https://www.youtube.com/watch?v=Wz_xJPN7lAY

hbag
Feb 13, 2021


havent watched the video but isnt that all of them

i am assuming this is The Joke

Adbot
ADBOT LOVES YOU

Computer viking
May 30, 2011
Now with less breakage.

Nah, there is absolutely a hierarchy. The boring ones like "jump if equal" are at the bottom, and the binary coded decimal ones fight with the super-niche SSE ones at the top.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply