3
votes
Will anything that's written in c/c++ be rerwritten in rust?
Anything? Sure. I mean, there's literally 50 years of legacy code out there, something will almost certainly be ported.
Everything? No way in hell. I mean, there's literally 50 years of legacy code ...
- 106k
2
votes
Accepted
Is it safe to make training data and labels as global variables in C?
in C, every callback should get a void* parameter to allow such decoupling. Then you can pass the address of a structure containing the parameters you need:
struct foo_data {
int alpha;
int ...
- 4,508
1
vote
Where to check preconditions in multi functions
There are basically two ways to deal with preconditions.
The caller is fully responsible, and if the preconditions are not met, all warranties are void. This is essentially how the C standard library ...
- 70.2k
1
vote
Should I assert the preconditions of functions in a public API?
People tend to fixate on the C “assert” macro. To me it’s much too inflexible.
Look at an abstract assertion instead. What should it do in production? There are choices. Do nothing is what C assert ...
- 40.5k
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
c × 1281c++ × 282
programming-languages × 73
design × 61
compiler × 59
java × 52
pointers × 52
coding-style × 49
memory × 45
data-structures × 44
embedded-systems × 44
linux × 39
multithreading × 37
programming-practices × 36
object-oriented × 35
assembly × 33
python × 32
algorithms × 30
libraries × 28
api-design × 25
architecture × 24
performance × 23
history × 22
array × 21
c# × 20