API Design Techniques
Posted
by
Dehumanizer
on Programmers
See other posts from Programmers
or by Dehumanizer
Published on 2011-06-27T10:18:44Z
Indexed on
2011/06/27
16:32 UTC
Read the original article
Hit count: 324
Is it right or more beautiful to name the functions with an prefix, like in Qt? Or using "many" namespaces, but 'normal' names for functions? For example,
slOpenFile(); //"sl" means "some lib"
vs
some_lib::file_functions::openFile();
UPD: I've read somewhere that the first variant(using some prefix) is better, because the API users can perform 'fast' search among the documentation and in the Internet. E.g. by typing the magic prefix search engine starts to advice the exact functions. Is it enough to use the first variant?
© Programmers or respective owner