www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19638] New: Demos should not use auto

https://issues.dlang.org/show_bug.cgi?id=19638

          Issue ID: 19638
           Summary: Demos should not use auto
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: faissaloo gmail.com

The use of auto in the runnable demos is pervasive across the language
documentation however this is extremely unhelpful when trying to adapt these
demos into useful programs as I cannot infer the type of the variable myself.
There are situations where one may wish to initialise a variable differently
based on a condition and so I will need to forward declare the variable however
I cannot do this because I do not know the type I should be using to declare
because it has been obscured by the use of auto in the demo.

--
Feb 02 2019