[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is there anything wrong with mixing C++ and C functions? There

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 21
Thread images: 1

File: image.png (23KB, 360x405px) Image search: [Google]
image.png
23KB, 360x405px
Is there anything wrong with mixing C++ and C functions? There are good C functions and there are good C++ functions, I don't think it's bad to use them both in the same codebase.
>>
Why on earth would you bother?
Just use C, and stop being stupid.
>>
>>60702241
There are many things in C++ that keep me around. C++11 is great!
>>
>>60702251
No. C++ is an awful language compounded by the fact that awful programmers use it.
>>
>>60702262
That's a bit too much of a generalization. Every language will have that group of people who don't know how to use it. Using C nowadays will make you waste more time with memory-involved tasks.
>>
>>60702234
It's fine as long as you are consistent about it.

C is very much easier to use to provide an API than C++ if you want to remain binary compatible.
>>
>>60702234
There's nothing wrong with language mixing.
>>
>>60702287
Yeah, I've been recently trying to write a .obj parser and I've found both modern c++ functions and old c functions to be useful in what I'm trying to do. Although when I first finished it I didn't think it would be "good" code if you catch my drift. Guess it's fine,
>>
>>60702262
Pajeet, pls
>>
>>60702313
Different tools suit different tasks. Go with what suits you or the task best.

In practice, few people bother with paradigm purity. It just isn't worth the hassle since there is no one technique that solves everything, the best way, all the time.
>>
>>60702262
Please elaborate on this point
>>
One of the primary reasons to use C++ over other systems languages is its ability to trivially call into C libraries without much modification. There is absolutely nothing wrong with using a C function in a C++ program.
>>
>>60702440
provided you are not doing retarded things like using new and malloc in the same program, sure. I wish I could say I haven't seen that one before.
>>
>>60702234
It's really easy to misuse C++ features badly, so there's a lot of bad C++ code and bad C++ programmers.
>>
>>60702262
/thread
>>
>>60702241
C is for stupid people who don't understand C++.
>>
>>60702850
C++ is for people too stupid to understand the elegance of C.
>>
>>60703048
(((elegance)))
>>
>>60703107
Hello! It looks like you made a mistake in your post. You _probably_ meant to post this in your containment board, also known as Politically Incorrect (/pol/ for short).

Here's a quick redirect for you to follow.
>>>/pol/

Please don't get lost on the way!
>>
>>60703107
>/pol/tard
Yup: too stupid.
>>
Officially I was taught not to mix paradigms by people much smarter than me.

I follow that rule.
Thread posts: 21
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.