随笔分类 - 代码之美
摘要:Naming Conventions“c” = camelCase“P” = PascalCase“_” = Prefix with _Underscore“x” = Not Applicable.IdentifierPublicProtectedInternalPrivateNotesProject FilePxxxMatch Assembly & Namespace.Source FilePxxxMatch contained class.Other FilesPxxxApply where possible.NamespacePxxxPartial Project/Assembl
阅读全文
摘要:The Art of Readable CodeAuthor:Dustin Boswell, Trevor FoucherPart 1: Surface-Level ImprovementsPart 2: Simplifying Loops and LogicPart 3: Reorganizing Your CodeSelected Topic: Readability and TestabilityKey IdeaPack Information into your names这里提供了六个准则,让你在命名程式中的变量(variable)、函数(function)、类(class)时,能取
阅读全文
摘要:ReferencesNamingGeneral Naming Rulesint num_errors; // Good.int num_completed_connections; // Good.int n; // Bad - meaningless.int nerr; // Bad - ambiguous abbreviation.int n_comp_conns; // Bad - ambiguous abbreviation.// Good// These show proper names with no abbreviations.int num_dns_connections;
阅读全文

浙公网安备 33010602011771号