Загрузка видео...

Не удалось загрузить видео

На главную

Why do some developers still prefer C over C++?

79,795 просмотров • 8 месяцев назад •via X (Twitter)

Комментарии: 34

Фото профиля LaurieWired
LaurieWired8 месяцев назад

I have…issues with this. Ok, if you want to implement all of the STL features yourself in every single program you make. Wanna vector? Make it yourself. Need to resize your vector? Better work on your own allocator. Not to mention C is *smaller* because it never adapted to the times. If you want to use smart pointers for memory safety, using good RAII practice you literally…can’t in C. Also, I highly recommend writing assembly programs by hand. It’s fun, and interesting. C++ is only “complicated” in the sense that it provides tools for nearly any usecase. If it was less complex, you would be missing core features. I know it’s a bit of a ramble, and I’m not trying to be mean. But I hear this logic commonly spread through programming circles and it’s extremely misleading.

Фото профиля Low Level
Low Level8 месяцев назад

At least from a security review perspective C++ is so much more difficult to audit. The constant expansion of context with inheritance and changing between classes makes reasoning about the code much more complicated vs C

Фото профиля Filip Jerzy Pizło
Filip Jerzy Pizło8 месяцев назад

Simple: C is easier to read C++ is easier to write If the maintenance of the code will involve more reading than writing then C is better

Фото профиля Furt_Tech
Furt_Tech8 месяцев назад

Simple, 'C' is god teir. No bs, pure and it does exactly what you tell it.

Фото профиля Maciej 'sorek' Łoboda
Maciej 'sorek' Łoboda8 месяцев назад

The right way of using C++ is to write it like C with hand writing all abstractions yourself. Simple and easy, gives you an edge in scaling project.

Фото профиля (((JReuben1)))
(((JReuben1)))8 месяцев назад

things that C++ got wrong compared to C: exceptions, inheritence

Фото профиля BitcoinIsMySafeWord
BitcoinIsMySafeWord8 месяцев назад

C is more safe for small projets. No malloc. No recursive loop. Misra compliance easy. Embedded c can be ultra safe

Фото профиля Dr. IGnatius T Foobar
Dr. IGnatius T Foobar8 месяцев назад

C is beautiful. C is elegant. C is the substrate of "good computing." It truly is the language for the ages.

Фото профиля the internets
the internets8 месяцев назад

It's not about performance, C and C++ have similar performance and whoever think otherwise is just stupid. It's not about zero-overhead. It's not about "close to the metal" either. In fact both technologies are pretty much the same on all these metrics. It's about language simplicity. C has 32 keywords and is very simple, C++ has more than 80 keywords and is very complex. I personally like both, each have good use-cases.

Фото профиля Null Set
Null Set8 месяцев назад

C 😍 C++ 💩

Фото профиля MONGCOLN
MONGCOLN8 месяцев назад

I love C and C++. Been away from it for too long developing in .NET. Might do a comeback.

Фото профиля Henry 🜋🏴‍☠️🇧🇷🇮🇱
Henry 🜋🏴‍☠️🇧🇷🇮🇱8 месяцев назад

Because you absolutely don't need OOP to make cool stuff that works.

Фото профиля DLCCMind
DLCCMind8 месяцев назад

A tip for those wandering in the land between C and C++. I feel you. And the solution is Odin. Excellent language, precisely filling that spot. Been coding for 42 years, mostly C and I can highly recommend Odin. @TheGingerBill made an excellent job.

Фото профиля Luis Miguel Romero
Luis Miguel Romero8 месяцев назад

I developed in C, C++ and C#. If I need performance I choose C over C++. If I need more flexibility, fast developing and complex system without critical performance I prefer C# over C++. The complexity of C++ now is insane for me.

Фото профиля Victor C
Victor C8 месяцев назад

Yup. C the best! Simple and clean.

Фото профиля skane_eng
skane_eng8 месяцев назад

Partly because it is simpler and partly because they're hidebound. Since C++ is nearly a perfect superset of C, you can use those features that are useful and safer than C while ignoring those features of C++ you find problematic or too complicated. Inheritance isn't required

Фото профиля avey_dev
avey_dev8 месяцев назад

C++ syntax is awful pOOP

Фото профиля Father Grippa
Father Grippa8 месяцев назад

C is much more straightforward and direct. If I needed something more complex and flexible, I would go with D, or Zig, or something like that.

Фото профиля ♡lanadelreyslefthood♡
♡lanadelreyslefthood♡8 месяцев назад

literally no one

Фото профиля 7on
7on8 месяцев назад

Wait, since when does Louis C K code in C?

Фото профиля Reece
Reece8 месяцев назад

"You know C is really great. I don't like C++. And yet somehow all the code is C++."

Фото профиля Reece
Reece8 месяцев назад

Casey's take. 😂

Фото профиля Grumpy_Old_Man
Grumpy_Old_Man8 месяцев назад

C is a scalpel C++ is a Swiss army chainsaw

Фото профиля John
John8 месяцев назад

I prefer a mix!

Фото профиля ImoutoFan
ImoutoFan8 месяцев назад

faster compiler

Фото профиля Pfs
Pfs8 месяцев назад

Today, there is no need to use c++. c# is just as effective at object oriented programming and the usage of libraries, mind you, the same libraries c++ uses. Usage of C and Assembler on the other hand is critical.

Фото профиля David
David8 месяцев назад

@GMusliaj this guy looks like another version of you, but without mustache and older 😬

Фото профиля Sanketh
Sanketh8 месяцев назад

While it’s possible to write bad code in both languages (and arguably a bit easier in C++), it’s not inherently true that C++ is slower than C. I’ve been going through the Stockfish codebase, the strongest chess engine in the world which has extremely performance-sensitive paths and searches millions of nodes per second even on consumer hardware. It’s written in C++, yet it clearly rejects the “high-abstraction” style many people associate with C++. Some patterns that stand out: - No heap allocation in hot paths (almost never anywhere critical) - Careful manual memory layout (cache lines, alignment awareness) - Predictable, data-oriented structures - Fixed-size arrays instead of std::vector - STL is used, but selectively — containers that may reallocate are avoided in hot loops because predictability matters more - Little to no if/else branches to avoid branch prediction misses (templates and compile-time polymorphism instead) - No heavy OOP patterns In other words, high-performance C++ isn’t "use every abstraction available", it’s “use only abstractions that compile away”

Фото профиля comonoidal esotericist 🇨🇿🇪🇺🇺🇸🦀
comonoidal esotericist 🇨🇿🇪🇺🇺🇸🦀8 месяцев назад

Cause they are stupid. Next question.

Фото профиля nitesh ⟲
nitesh ⟲8 месяцев назад

what’s your go-to language for system-level programming and why? 🖥️

Фото профиля Master.dev (Formerly Frontend Masters)
Master.dev (Formerly Frontend Masters)8 месяцев назад

@nitesh_backdev question for @rtfeldman

Фото профиля SimpleCoffee
SimpleCoffee8 месяцев назад

He is missing the main features of C. It is simple enough for a competent person to write a compiler for it. This is important if you manufacture your custom chips and wanted people to use it, your code to last long and minimise differences in implementations.

Фото профиля Poikilos
Poikilos8 месяцев назад

C++ isnt actually safe, just gives you conveniences to make things safe... but in the form of increasingly complex and conflicting paradigms over the years.

Фото профиля khode Knight
khode Knight8 месяцев назад

I would argue it's more of a hard line thing. Many just prefer it out of ego even though it can be verbose syntactically. But being honest c++ is richer 😅😅

Похожие видео