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
BinaryByter
and as said C++20 will improve that
Ибраги́м
Ибраги́м
BinaryByter
20 years after I have been born, C++ will have networking xD
Anonymous
Well, it can still use the kernel syscalls though
BinaryByter
Ибраги́м
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++
Ибраги́м
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
Ибраги́м
BinaryByter
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++
BinaryByter
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
BinaryByter
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
Ибраги́м
It's a simple real world, one header task
Ибраги́м
But will never be simple in C
BinaryByter
what task is it?
Ибраги́м
BinaryByter
rohit
Anonymous
We aren't your servants
rohit
#projects
rohit
Ибраги́м
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
BinaryByter
Anonymous
Just done reading
Anonymous
Can u help me to crack interviews based on java& c
BinaryByter
lol
BinaryByter
no we can'T
Jussi
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 C++, u can get a smaller binary size because there's no code duplication like u have in C."
can you elaborate on this?
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
BinaryByter
BinaryByter
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
BinaryByter
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
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
Ибраги́м
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?