4 ms·
noob question - what is the use case for a program that operates on arbitrary user defined types? Dynamic typing sounds lazy and slow in my head, might as well
by rasz_pl 11y ago
noob question - what is the use case for a program that operates on arbitrary user defined types?
Dynamic typing sounds lazy and slow in my head, might as well use python at this point
- simoncion 11y ago> ...what is the use case for a program that operates on arbitrary user defined types? That's not what's going on. Neither C nor C++ really permits that. We're just talking about the relative merits of using printf and friends vs. using iostream to format data for the console or disk. In either case, you have to write the code for your class that massages the class's internals correctly, but the question is, do you write to the ostream extraction and istream insertion API, or do you write to the substantially less well defined printf-and-friends API?