I'm a simple man I see a new The Builder video, I click it
@marbens5 ай бұрын
C does support objects. Quote from C99: " *object* region of data storage in the execution environment, the contents of which can represent values "
@TheBuilder5 ай бұрын
The term object is used in a somewhat ambiguous and loose manner. An integer is an object by this definition, and I do recall some books referring to everything as objects. In the sense of an object having preprogrammed behavior that runs automatically at set points in an objects lifetime, this isn't supported in C
@Algorithmswithsubham5 ай бұрын
Woow ,interesting
@jesusmgw21 күн бұрын
So, what is it? The video never explained what RAII is.
@TheBuilder21 күн бұрын
It's a fancy name for constructors and destructors handling system resource life times
@gregorymorse84235 ай бұрын
Wrong. In C, #define macros can be used to implement RAII with BEGIN(...) and END(...) replacing curly braces. Further alloca and variable length array initialization e.g. int a[x] in C99 are forms of RAII in C. GCC implements a cleanup attribute that also allows RAII. The wrong multiplicity factor is high here.