Sandy #КИБЕРИНЖЕКТОРЫ
I am learning java🥳
Oleksandr
I am learning java🥳
my first lang was java, so...
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
It is easier to learn programming basics with C++, not C
MᏫᎻᎯᎷᎷᎬᎠ
Gc ewww
Anonymous
🌚why not java then?
We are talking about C++ and C
MᏫᎻᎯᎷᎷᎬᎠ
Generics types must be inherited from the object class
Sandy #КИБЕРИНЖЕКТОРЫ
MᏫᎻᎯᎷᎷᎬᎠ
Yakk
MᏫᎻᎯᎷᎷᎬᎠ
No place for primitives
Sandy #КИБЕРИНЖЕКТОРЫ
But why
MᏫᎻᎯᎷᎷᎬᎠ
Oleksandr
u talk not to learn "all" C++, just "some right way" as i can see, this more similar to java)) > no need to think about pointers > memory allocation > strong typed
MᏫᎻᎯᎷᎷᎬᎠ
Sandy #КИБЕРИНЖЕКТОРЫ
MᏫᎻᎯᎷᎷᎬᎠ
I started with java 😌
And do you prefer it over C++?
MᏫᎻᎯᎷᎷᎬᎠ
If it because it's easier I feel sorry for you
Oleksandr
Using RAII and its features
but i can do this in both C++ & java in the same way(in Java even easier) :DD
MᏫᎻᎯᎷᎷᎬᎠ
It has only GC
Anonymous
Then talking about raw pointers and memory management
MᏫᎻᎯᎷᎷᎬᎠ
Sandy #КИБЕРИНЖЕКТОРЫ
If it because it's easier I feel sorry for you
Its ok I will be do it later After completing java
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
but i can do this in both C++ & java in the same way(in Java even easier) :DD
No In Java you have to release resources by yourself (like opened files) C++ makes it easier, if you write good code with RAII
Victor D.
Bjarne lol
Not even him
Anonymous
Smart pointers solved it
I talk to teach smart pointers first, than the raw one
MᏫᎻᎯᎷᎷᎬᎠ
Which means another thread in the background
Anonymous
I'm talking not about memory
MᏫᎻᎯᎷᎷᎬᎠ
Performance penalty
klimi
Everything is alright?
Anonymous
Java is not going to close a file for you
MᏫᎻᎯᎷᎷᎬᎠ
I'm talking not about memory
I think file descriptor is a memorial thing, right?!
olli
but i can do this in both C++ & java in the same way(in Java even easier) :DD
No, RAII is not only about deterministic destruction but also about initialization, hence the name.
MᏫᎻᎯᎷᎷᎬᎠ
Oleksandr
Everything is alright?
take popcorn & enjoy
klimi
take popcorn & enjoy
If everything is alright I will get back to destroying my keyboard
Anonymous
You have to close handle by yourself
klimi
Good luck :D
Waiting for my keycaps to dry~
Anonymous
If you forget to do it, you're unable to use it while your process is running
olli
but i can do this in both C++ & java in the same way(in Java even easier) :DD
In C++ if you Foo f[10]; you initialize ten elements. Java has a bunch of nullpointers.
Anonymous
#ot
Anonymous
And nullabilty is a hell
MᏫᎻᎯᎷᎷᎬᎠ
Java uses a lot of the heap
Anonymous
Cuz it's stored in the heap
And why newbie needs to know that?
MᏫᎻᎯᎷᎷᎬᎠ
And nullabilty is a hell
The legendary NullPointerException
Anonymous
Make no sense
Watch the Kate Gregory's talk
Oleksandr
StupidProgrammerException
MᏫᎻᎯᎷᎷᎬᎠ
And why newbie needs to know that?
Who asked newbies about it?!
MᏫᎻᎯᎷᎷᎬᎠ
My second choice is Rust
MᏫᎻᎯᎷᎷᎬᎠ
No GC
MᏫᎻᎯᎷᎷᎬᎠ
RAII
MᏫᎻᎯᎷᎷᎬᎠ
fast or close to C++
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
But not matured as it
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
Forgot to mention its strict compiler
MᏫᎻᎯᎷᎷᎬᎠ
You are forced to write a safe code
Anonymous
And lack of UB in safe context
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
I can't wait for C++20
MᏫᎻᎯᎷᎷᎬᎠ
Module support❤️
MᏫᎻᎯᎷᎷᎬᎠ
At last
Stephanos
So who is here, that will be attending the std::meeting in cologne next week?
MᏫᎻᎯᎷᎷᎬᎠ
I still find static check of validity of moved object in Rust is very attractive I hope C++ committee do something about like that
MᏫᎻᎯᎷᎷᎬᎠ
Clang compiler has a similar attributes for the validity check but it produce only warnings!!! :(
Stephanos
:D
Oleksandr