BinaryByter
networking is not the main purpose of C++
Anonymous
It's a general purpose language
BinaryByter
Well yea
BinaryByter
but you can use a third party library if you want to
BinaryByter
And it shouldnt really be a problem
Ибраги́м
I've never understood the hate for the pointer
It's not hate, they're not meant to be used in some instances. But in some cases, pointer can't be avoided. C++ differentiate btwn these two cases, hence reference
BinaryByter
and as said C++20 will improve that
Ибраги́м
I read that as unnecessary liabilities
C doesn't have a networking lib.
Ибраги́м
BinaryByter
20 years after I have been born, C++ will have networking xD
Anonymous
Well, it can still use the kernel syscalls though
BinaryByter
Well, it can still use the kernel syscalls though
It couldnt do stuff like cout else
Ибраги́м
It's a general purpose language
ASIO is being updated frequently to reflect the standard networking proposals. Plus there are many other libs u could use.
Ибраги́м
Anonymous
Yeah, that caused a problem when I was trying to port some libpcap stuff to C++. ended up leaving it in C because I didn't know how to use functions as parameters in C++
Ибраги́м
20 years after I have been born, C++ will have networking xD
I even read the first proposal were older than u are
Anonymous
I suspect I could have used another library but my employer really wanted to stick with libpcap
Dima
this is the best what I ever seen and using now: https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b
BinaryByter
Man i'm so young lol
Anonymous
I'm fine working in C but I haven't done much more than a semester long course in C++
Anonymous
When I do stuff with C++, I probably spend most of my time reading cppreference or one of those type of site
Anonymous
*sites
Ибраги́м
Yeah, that caused a problem when I was trying to port some libpcap stuff to C++. ended up leaving it in C because I didn't know how to use functions as parameters in C++
And that's the problem with C, it's development, developers are STALE. Virtually none of them use C11. While stats shows a good number of C++ guys using Modern C++. I am alwayz on the bleeding edge
BinaryByter
ŝo theres nothing to read about
Ибраги́м
Anonymous
apart from the theory of what you are implementing
Anonymous
I think the thing is, I don't work on big projects, i spend 2 or 3 days writing a PoC and then it's done and I probably never touch it again
Anonymous
And I've always seen C++ as being an "enterprise" language
Ибраги́м
I'm fine working in C but I haven't done much more than a semester long course in C++
I can give u a simple task I've done in C++ and D, am sure ur C solution will be deprezzing
Ибраги́м
It's a simple real world, one header task
Ибраги́м
But will never be simple in C
BinaryByter
what task is it?
Ибраги́м
what task is it?
My smart read of course
BinaryByter
rohit
Anonymous
We aren't your servants
rohit
#projects
Ибраги́м
Anonymous
think better
Did you try creating your own &| searching on your own?
rohit
ya
rohit
advanced serch option not come understood bro but
Anonymous
Ибраги́м
C is an instrument which can be fast-learned (compared to C++). C is close to hardware as possible, but still portable - that's why preffered by _any_ EE there over C++. C has standart ABI. C++ is almost a garbage without userland libraries, belive me, I'm making C++ project in embedded. C has lots of UB. C++ has tons more of UBs. After C++14/17 I'm attracted to it and many people too, but to make system-level job you need lot more knowledge of C++ than you would expect (compared to C).
1. Where is the proof that C has a standard ABI ? NONE! 2. C++ gives u the option to easily implement ur own userland libraries, believe I'm doing it. 3. C++ is even better for embedded if u have a good compiler. - With C++, u can get a smaller binary size because there's no code duplication like u have in C. - RAII is a killer feature C is still dreaming of. - Embedded C++ is easy because u only use subset of standard C++, no exception, no virtual, ... - U've got power of : Templates, RAII, strong typed enums, Lambda and closures, OOP if u need it, Easy FP for we FP fan boiz, a well written embedded stdlib (third party: etl, EASTL...) with most DS and Algos, and it's gonna get better with C++20 features like Concepts and Ranges. C is still stuck at C11 that virtually no one uses.
Ибраги́м
With every iteration of C++, C obsolescence increases by a power of 10.
Ибраги́м
I will only write embedded C if I were captured in North Korea, because ... we all know why. Other than that, all C code bases are questionable
Anonymous
Just done reading
BinaryByter
Just done reading
Took you 6 minutes
Anonymous
Can u help me to crack interviews based on java& c
BinaryByter
lol
BinaryByter
no we can'T
BinaryByter
Just learn those langauges instead of thinking that you can trick employers into thinking you know the langauge
Anonymous
Didn't notice ur mssg srry for the delay
Jussi
Tell me how gcc and g++ differs when it comes to optimization?
Jussi
Well if you're a terrible coder, C++ is better but basically both gcc and g++ are so shit at optimizing code that well your points are not valid
Jussi
Sorry for that message, what I'm trying to say that you can optimize your code as well with C than with C++. And I would say that on most cases C++ creates much bigger binaries
Jussi
I don't know how you code C but I usually get much smaller binaries with it
Jussi
"- With C++, u can get a smaller binary size because there's no code duplication like u have in C." Code duplication is like the only part where the C compiler can optimize the code lol
BinaryByter
thats what you are doing
BinaryByter
please do so in an empty group
Jussi
Still doesn't make your argument valid :D
BinaryByter
idc about you thinking that my argument isn't valid
Ибраги́м
I don't know how you code C but I usually get much smaller binaries with it
Because u write single function in C++ with template and compile-time dispatch, while u write like 2 or more functions in C for the same task (if u decided not die in MACROS).
Jussi
I don't understand the point
Jussi
if you have a function that takes a template, for example square()
Jussi
In C You must write 2 functions int square() and double square(), right?