MᏫᎻᎯᎷᎷᎬᎠ
Parra
of course
MᏫᎻᎯᎷᎷᎬᎠ
or virtual methods?
Parra
but you dont have embedded constructions to do it
Talula
Object Oriented C is called C++
Parra
you can do it
Parra
they are completely different things mate
MᏫᎻᎯᎷᎷᎬᎠ
yes
dafaq?!!! 🤔
Parra
there is good C code
Parra
not just crap
Parra
if you use correctly the existing patterns you can do clean c
Talula
And why should I do that? I can use C++ or even better C#...
Parra
this is my vector "class" in c
Parra
https://github.com/metacall/core/blob/develop/source/adt/include/adt/adt_vector.h
Parra
https://github.com/metacall/core/blob/develop/source/adt/source/adt_vector.c
MᏫᎻᎯᎷᎷᎬᎠ
C be like: put a lot of functions declarations on one file and put the definitions on the other
Parra
i can use js too
MᏫᎻᎯᎷᎷᎬᎠ
Parra
i use 3 files in c++, hpp, cpp and inl
MᏫᎻᎯᎷᎷᎬᎠ
C++ is more organized
Parra
ok
MᏫᎻᎯᎷᎷᎬᎠ
you have namespaces
Parra
this is absurd mate
Astral
Can anybody tell me what is the purpose of int before main()?
Parra
I'm just showing ways to do things in c
Parra
i know c++ is better
Parra
not arguing about that
Talula
mate c++ is the same
No it's not same... you have something called inheritence.
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
if it's okay then it returns 0
Parra
this is a.waste of time
MᏫᎻᎯᎷᎷᎬᎠ
this is a.waste of time
don't waste your time arguing on something all the community know about
Talula
in terms of files cpp/hpp
See the thing is in C++ I can simply declare a variable that is an object of String and use it... in C I have to manage array of char.
Parra
I'm not arguing
Talula
Not fun.
Parra
you misunderstood me
Parra
but ok
Parra
i dont care
Talula
So as I said I like C till I get to part of strings.
CM
Didnt get it
When you run your program where you used the int main() it must return 0 if the case is true
CM
C++ for me it's only good for writing Algo Trading Software
CM
Then C for writing graphics
Parra
and OOC isnt c++
Parra
learn that before judging
Parra
object oriented c
Parra
it's a pattern
Parra
i think most of you assumed i was arguing against c++ but i wasn't at all
Talula
Yeah you could use struct and make it look like object oriented programming but problem is OOP is more than that.
Parra
of course
Parra
in fact when i code c++ i never use OO
Parra
i do generics
Talula
i think most of you assumed i was arguing against c++ but i wasn't at all
No no... I get it you're saying in C you can write Object Oriented code... but that is true for variables and if you make pointer to function etc.
Parra
constructors, destructors
Parra
you can emulate most of it
Talula
i do generics
Everything in C++ is OOP even if you think you're not using it, you are.
Parra
not generics, but you still have preprocessor metaprogramming
Parra
it's not something anybody should use, but it's possible
Parra
I'm going to stop
Talula
As you like but it's like running extra to get something that already exists.
Pavel
Everything in C++ is OOP even if you think you're not using it, you are.
Well, you still can write everything with pure functions :)
Parra
Well, you still can write everything with pure functions :)
and generics (like boost does most of times)
Talula
im not saying the opposite
I know you're not but I'm saying why would I go that distance just to write somethig in C that works like C++ when I can do it in C++... that's all.
Raul
Everything in C++ is OOP even if you think you're not using it, you are.
Explain to me this, because this is not true at all.
CM
I just don't like C interface. So I write my C in Dev C++ and run though sometimes it's not 100% achievements
Talula
cout is a function of std::cout which is an object even if you didn't create it.
Raul
cout is a function of std::cout which is an object even if you didn't create it.
So is print from Python, system.out.printline from Java, and Console.out from JS. What's your point?
Talula
So is print from Python, system.out.printline from Java, and Console.out from JS. What's your point?
Read from the start the discussion and read your question again and my original point...