Why is it bad to use "C style" in C++? Like the c standard library functions, char arrays instead of strings, malloc instead of new keyword etc?
blame GNU.
>>55194996
If you want to use the C code style just fucking code in C you idiot.
>>55195240
Then why bother having it included in the language at all?
>>55196030
C++ isn't really a language all its own; it was an extension for C that grew into what it is today.
>why is it bad to use "C style in C++
Because it is. In every way. Less efficient, more effort, you're reinventing the wheel, etc. It's just a bad idea.
>>55196030
because c++ is built on top of c
Because C++ is full of bloat, malloc is faster than new, char array is faster than string etc, but sometimes that one C++ feature is just too useful to skip.
>>55196097
So, again, why is using the base part of the language necessarily bad?
>>55196252
because then you'd be writing c code with a c++ wrapper.
it's the same reason as why you _usually_ don't write assembler code in a c program (there are some reasons to do i though).
also, some compiler checks and probably runtime checks wouldn't work.
>>55196392
C++ wrapper? What are you talking about? All C keywords are still a part of C++. Unless you're using some garbage compiler with no support, I'm not sure what kind of problems you're going to run into here. Can you give me an example?
>>55196481
c++ has some kind of type safety, while c almost doesn't know what datatypes even are.
for c++ you have to cast malloc while you never should in c
for what reason would you want to write c code in c++ ? why not just c ?