Talula
C is super fast language,but hard to master.
Not really... and not really...
Talula
C is not the fastest language.... C is also the easiest language for me.
Talula
That is pointers I can make that stuff in Pascal too and it gets worse in assembly.
cjen
I once meet a PhD who claims her master c in one week.
cjen
And she never free memory.
Talula
cjen It's the same thing in Pascal any older language has same exact issues, if you compare C with C# then just because C# runs on a stupid .NET framework which takes care of garbage collection it doesn't make it simpler, it makes it how should I put it... impotent.
cjen
Gc is not issue in PL level.
cjen
And the statement is no problem.
Talula
I didn't even understand what you said... what do you mean GC is not in PL level?
Talula
Ok garbage collection is not PL?
Talula
Well there are no native compilers of C#... no none not even one.
cjen
Of course not.
Dima
they were planning to do .net native, some gibrish converter (removes that layer of net) but seems like its inactive project
Dima
but you guys, are #ot
Talula
It's talking about C being hard... it's not OT
Dima
it’s comparesment and stuff, but anyways
Talula
Come on no one is talking about anything today...
Anonymous
Varzish tajakistan
Anonymous
Hello
Talula
What does that mean?
Anonymous
Hello means hi
Dima
lol.
Talula
Hello means hi
No it doesn't... Hi is used in friendly manner only, Hello could be used by anyone.
Talula
sir, ...
ma'am...
Kelvin
Saar
Mihail
And she never free memory.
So she leaves memory leaks or never makes a program that uses over 4MB of memory?
Mihail
Because both ways that's stupid
Talula
So she leaves memory leaks or never makes a program that uses over 4MB of memory?
Actually in C you don't have big leaks, worst leak you can have if you malloc memory and do not free it, C++ has the issue of memory leaks because you can create object and forget to free it.
Talula
Leaks also happen in C#, I made a program to display random images from server, but when I ran the application it kept getting bigger... problem was I didn't free the "graphics" object, I did the same program in Lazarus and because I knew I had to free it, I did that and it worked fine. Other problem was C# doesn't allow me to free everything, I couldn't find what I wasn't freeing for days.
Talula
So no garbage collector isn't always good, because you can make an unmanaged application in C#, unlike Java and that could leak memory.
Talula
Simple C has almost 0 leaks if you do not malloc, you'll not have leaks.
BinaryByter
C++ is better on that behalf
Avezy
You can leak resources almost everywhere
Avezy
Good design is important
BinaryByter
^^^^^
BinaryByter
C++ has big advantages with - for example - references
BinaryByter
references are safe
Avezy
Well they can get confusing in terms of ownership if used incorrectly but yeah
Avezy
Also with garbage collectors you can have cyclic references and with that you again have: leaks (kinda) the python garbage collector actually resolves cyclic references if you do not overwrite the destructor with your own del But thats also another point for good design
BinaryByter
ewww
BinaryByter
python
BinaryByter
python
BinaryByter
python
Mihail
Simple C has almost 0 leaks if you do not malloc, you'll not have leaks.
How's C++ different in that regard? new always goes through malloc
BinaryByter
eww
Mihail
You can create object and not free it...
In C you can create a variable and not free it
Mihail
Same thing
Talula
In C you can create a variable and not free it
Variables can't be "freed".
Talula
Try doing that.
Avezy
You can create object and not free it...
Only if you create it on the heap and thats the same as C
Ariana
Variables can't be "freed".
if you declare them on the stack
Talula
Only if you create it on the heap and thats the same as C
You have to create objects in C++, you don't have to use heap in C
Ariana
Dude heap is used like all the time
Talula
if you declare them on the stack
Yes if you do something that is complex... sure.
Ariana
There we go its on the stack
Mihail
You're getting some fundamentally different things mixed up here
Mihail
Yes if you do something that is complex... sure.
Or like anything that requires over 4MB of memory
Talula
You're getting some fundamentally different things mixed up here
Like what? Do I have to free a variable I decleared as int i = 0;?
Mihail
That's on the stack
Ariana
But lets say a dynamic array
Talula
And when I'm out of the function what happens to the stack?
Ariana
Or a linked list
Talula
The stack is cleared....
Ariana
Its just there, probably will get overwritten
Mihail
And when I'm out of the function what happens to the stack?
Gets cleared unless it's with a static lifetime
Ariana
Gets cleared unless it's with a static lifetime
Not rlly you still can access it actually