klimi
And even if, i have worked with them
klimi
So
klimi
Maybe
klimi
Maybe not
klimi
Anonymous
@ollirz here is some of my C code
Anonymous
Anonymous
this is for an STM32f4
Anonymous
my bad stm32f103
Anonymous
ya they are
Otumian
Hi.. just a little question.. What do you guys think about using member initialization over getters and setter?..
BinaryByter
getters and setters are oftentimes useless
BinaryByter
they clutter code, add a function call to the assembly output, and in the end don't help encapsulate
Otumian
Thanks
olli
they clutter code, add a function call to the assembly output, and in the end don't help encapsulate
"and in the end don't help encapsulate" » They do help for encapsulation purposes, you can change the internal behavior without changing the interface. This is actually an important property for large scale software. Furthermore it helps making your object (partyle) immutable "add a function call to the assembly output" » for plain getter I have seen the compiler to optimize it in several occasions
olli
i was talking about plàin getters and setters that don't have any other meaning that returning or setting a state
I did so to. Still there might the a decision to change the internal behavior for whatever reason. But again - it always depends
olli
IMO - not using getters and setters is fine for POD's If you have a custom constructor for example, chances are your class it not a "POD"
olli
Hi.. just a little question.. What do you guys think about using member initialization over getters and setter?..
IMO: As always in C++ it depends. For POD's I would not consider using getters/setters, for "real" classes I would
olli
did my code pass your code review?
Without going too much into detail, Yes (assuming it runs on non-safe systems) Although I think you should not use bitwise shifts on signed integral values
Anonymous
non-safe?
olli
non-safe?
ASIL compliant stuff
Anonymous
oh ya no it runs on a robotic arm (MR-Clutch motor)
Anonymous
not for automotive purposes
Anonymous
only for research purposes
olli
What's your take on "shifting signed values using bitwise operators" ?
Anonymous
the only one that i have that is signed is actually i and j
Anonymous
at the end
Anonymous
you are correct you should not do that and that actually seems to be a typo on my end
Anonymous
which is weird because that particular one already worked (tested that whole code and it was giving out correct values)
Anonymous
it is on an ARM chip so maybe that is why that was ok
Anonymous
OH ok i see someone changed that to an int for his own code
Anonymous
that might have been why
Anonymous
i did not look through the git commits
Anonymous
i have no idea why it was changed
Anonymous
so i just changed all those ints into uint_fast8_t in crc16
Anonymous
nope have to change it to uint8_t (limited memory on the device)
Shubham
😊
Suraj
Just found
Suraj
Ohh
Suraj
Okay
Sumeet
Hi all
Anonymous
Hi anyone know details memory management in c and c++
Anonymous
Or any reference
olli
Hi anyone know details memory management in c and c++
Have you seen this https://en.cppreference.com/w/cpp/memory?
Anonymous
Cool
Anonymous
Hi good morning
KHIZAR HAYAT
Hiii
Anonymous
#howtoprogram
Abdul
⠠⠍⠥⠓⠁⠍⠍⠁⠙⠽⠥⠎⠥⠋
Sololearn?
BinaryByter
I can't dare to look at those getters and setters
Abdul
Sololearn?
Yess 😊
⠠⠍⠥⠓⠁⠍⠍⠁⠙⠽⠥⠎⠥⠋
Anonymous
Does any one have programming in c hand written material
klimi
/warn @sumeetmahajan promo?
Sumeet
??
Sumeet
link posting is not allowed?
BinaryByter
you will be allowed in a few day
Anonymous
heyy do you know any good free C++ IDE/editor for linux? I'm so used to visual studio's Intellisense.
BinaryByter
vsccodium
Anonymous
? vs-code?
BinaryByter
vsccodium
BinaryByter
its a FOSS fork of vsccode
Anonymous
oh cool
Roxifλsz 🇱🇹
its a FOSS fork of vsccode
I don't think it's actually a fork, just a project for providing open source binaries of VSC
Anonymous
vs-code is too bad for C++
Roxifλsz 🇱🇹
vs-code is too bad for C++
What do you mean by that?
Roxifλsz 🇱🇹
IntelliSense is really nice for C++
Anonymous
Abde
it supports raw C++ (without Qt)
Roxifλsz 🇱🇹
Vim for terminal and vscode or atom for a IDE with a GUI
Plox no atom, it's rather badly made and hogs resources (unless they actually got their shit together and fixed that stuff)