I read: "Concrete types are rarely useful as grounds for further inference" ------------ Stroustrup p. 768
How to interpret this? Does this mean that we should get a derived class from a base class with a pure virtual function? However, I see a lot of code with a derived class derived from specific types.
Can anyone help me out?
, , . ? , gotchas. getchas, , , (, , , , , , , ). , , .
, , . , ? ( ) . ( , , ). , , , , , , . .
Edit:, , - . , , , , , .
, , , .
", , ". , () .
. , Stroustrup , , -, .. ; , , - , . OTOH, "- ... . , ". . 766
The idea here is that you should not inherit types such as int, floator std::string. In any case, you will not get OO behavior from int foo(int a). Even for the int foo(std::string&)lack of virtual functions in std::stringmeans that fooit will not cause your overrides.
int
float
std::string
int foo(int a)
int foo(std::string&)
foo
Source: https://habr.com/ru/post/1727549/More articles:Garbage collection in Java - javaиспользуя имена учетных записей в качестве соли - cryptographyIs StringComparer.CurrentCulture the right choice to use in this case? - .netSet opacity to CGLayer before the draw? - iphoneStacking static classes in PHP - functionHow to write a value object in XAML using markup extension? - wpfMinor versions for SharePoint custom list - listRebar Manufacturing Jango JSON - djangoобщий учебник по java-серверу/клиенту - javaProblems with pycurl.POSTFIELDS - pythonAll Articles