On 2013/01/19 07:33, Denis Krjuchkov <de...@crazydev.net> wrote: > Important thing for wrappers is error management: > errno might be messed in between because constructing Path might > change it. What are options here?
Path::Null() does not modify errno. And Path::Null() shall be returned on error. No problem. > Also I've forgot about logging. Should logs be UTF-8 too? What if > logging is redirected to stderr. In that case FS encoded paths are > expected. Log file is UTF-8. Logging to stderr is for debugging only, it's not a "supported operation mode". If that turns out to be an issue, then the logging library must convert. > In project I work on we tend to avoid writing abbreviations in all > caps. For example HTML is spelled Html. This gives some better > readability. My eyes blow on names such as FLACIOHandle. There are > some corner cases like Io, Id (they don't look cool IMO). But can't > we adopt this approach for some longer names (i.e. four or more > letters)? > FLACIOHandle would be FlacIOHandle. Anybody knows what FLAC means > anyway, but Flac is more readable in identifiers. Yes, if you like "Flac" more than "FLAC" in camel-case names, I'm ok with changing it. ("Id" is an abbreviation, but it's not an acronym, therefore "ID" is wrong in any case.) > C++ provides wrappers for standard C headers (e.g. cstdio for stdio.h). > Are there any rules on them? I tend to use them, however they have > serious disadvantage: it's hard to predict whenever some function > would appear to std namespace. So should we dismiss those headers? I have never used the C++ wrapper headers, I don't know why they exist and whether using them has an advantage. Until somebody explains it to me, I'll keep on using standard C headers, but I wouldn't mind patches using C++ headers and std::. ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_123012 _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team