digitalmars.D.learn - Suggest aesthetic way to Naming a module or a package with illegal
- BoQsc (13/26) Jun 16 2019 Do not ask why I want to do that, you can however suggest
- rikki cattermole (2/2) Jun 16 2019 The style guide has an opinion about this (you don't have to follow it).
- BoQsc (5/11) Jun 16 2019 So if I follow dstyle guidelines on keywords, this would be a
- Jonathan M Davis (5/19) Jun 16 2019 Well, technically, per the style guide, the underscores would go at the ...
Do not ask why I want to do that, you can however suggest alternative variations. As you all might know,2. The Identifiers preceding the rightmost are the Packages that the module is in. The packages correspond to directory names in the source file path. Package and module names cannot be Keywords.https://dlang.org/spec/module.html#module_declaration The D Spec literally says that we cannot use these words in the Module Names: https://dlang.org/spec/lex.html#Keyword Example, we can't Name Modules or Packages like that:module auto.alias.abstract; void main(){ }I would like to know if there is any way to make it possible to name Modules/Packages via preoccupied lexical words, or at least receive some suggestions on some aesthetic naming for a module/package that includes these lexical d words. Examples:module dauto.dalias.dabstract; void main(){ }module CustomAuto.CustomAlias.CustomAbstract; void main(){ }
Jun 16 2019
The style guide has an opinion about this (you don't have to follow it). https://dlang.org/dstyle.html#naming_keywords
Jun 16 2019
On Sunday, 16 June 2019 at 11:38:27 UTC, rikki cattermole wrote:The style guide has an opinion about this (you don't have to follow it). https://dlang.org/dstyle.html#naming_keywordsSo if I follow dstyle guidelines on keywords, this would be a correct non-conflicting result:module _auto._alias._abstract; void main(){ }The underscore way, I kind of liking it, thanks for sourcing the idea.
Jun 16 2019
On Sunday, June 16, 2019 5:53:30 AM MDT BoQsc via Digitalmars-d-learn wrote:On Sunday, 16 June 2019 at 11:38:27 UTC, rikki cattermole wrote:Well, technically, per the style guide, the underscores would go at the end of the names, not the front, but that's only if you're trying to follow the style guide rather than be inspired by it. - Jonathan M DavisThe style guide has an opinion about this (you don't have to follow it). https://dlang.org/dstyle.html#naming_keywordsSo if I follow dstyle guidelines on keywords, this would be a correct non-conflicting result:module _auto._alias._abstract; void main(){ }The underscore way, I kind of liking it, thanks for sourcing the idea.
Jun 16 2019