Difference between revisions of "Talk:Phobos coding conventions"

From D Wiki
Jump to: navigation, search
(Items to clarify: new section)
 
m (Items to clarify)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{talk}}
 +
 
== Items to clarify ==
 
== Items to clarify ==
  
Line 8: Line 10:
 
:* Should operators appear before or after a line break in a wrapped line?
 
:* Should operators appear before or after a line break in a wrapped line?
 
:* Are there preferred break points when multiple subexpressions are involved?
 
:* Are there preferred break points when multiple subexpressions are involved?
 +
* How to indent a long series of UFCS method calls?
 
* etc..
 
* etc..
  
 
Probably there are no hard answers to some of these questions, but a rule of thumb would be nice to set down.
 
Probably there are no hard answers to some of these questions, but a rule of thumb would be nice to set down.
 +
—[[User:Quickfur|Quickfur]] ([[User talk:Quickfur|talk]]) 20:21, 13 December 2012 (CET)
 +
 +
 +
Why does this page even exist? This information is on dlang.org: http://dlang.org/dstyle.html Granted, that page still needs some work (e.g. I'd really like to see the section on comments removed), but it's mostly up-to-date now. This page seems completely redundant. If changes need to be made to the style guide, they should be made via pull requests to d-programming-language.org on github and not by creating a new page here. —[[User:jmdavis|Jonathan M Davis]] ([[User talk:jmdavis|talk]]) 21:43, 22 December 2012 (PST)

Latest revision as of 05:46, 23 December 2012

This is a talk page. It is to be used for discussion of potentially controversial or otherwise large changes to the article itself.
  • Please use the Add Topic link to start a discussion on a separate topic. Don't start a new topic inside an unrelated section, as it will only cause confusion.
  • As a rule, it is considered bad form to edit somebody else's comments. Instead, post your reply to their comments immediately after.
  • Please sign your comments with four tildes (~~~~) so that we know who said what.

Items to clarify

I've added some of the known coding conventions to this page, but I'm not sure what's the official conventions for the following:

  • How to indent signature constraints?
  • How to indent in/out contracts?
  • How to indent complicated deeply-nested expressions inside an if condition?
  • Should operators appear before or after a line break in a wrapped line?
  • Are there preferred break points when multiple subexpressions are involved?
  • How to indent a long series of UFCS method calls?
  • etc..

Probably there are no hard answers to some of these questions, but a rule of thumb would be nice to set down. —Quickfur (talk) 20:21, 13 December 2012 (CET)


Why does this page even exist? This information is on dlang.org: http://dlang.org/dstyle.html Granted, that page still needs some work (e.g. I'd really like to see the section on comments removed), but it's mostly up-to-date now. This page seems completely redundant. If changes need to be made to the style guide, they should be made via pull requests to d-programming-language.org on github and not by creating a new page here. —Jonathan M Davis (talk) 21:43, 22 December 2012 (PST)