What    |Removed                     |Added
                 CC|                            |

--- Comment #6 from 2012-02-27 05:16:59 PST ---
(In reply to comment #4)
> The reason is straightforward - there's no point to it. Nested functions tend
> to be right next to where they are used. They're not off in a separate file.
> We shouldn't have features just to have features.

But we do have overloading in the language already. We shouldn't just deny
access to existing features. Chances are that a compiler works better if there
are no arbitrary inconsistencies (see all the bugs related to parsing storage
classes of nested declarations for an example -- just define the language such
that reusing parsing procedures is easy.)

> They have to have an identifiable benefit. Overloaded functions introduce 
> complexity both to the user and the compiler - and there is no clear benefit 
> for nested functions.

What introduces complexity to the user and the compiler is that the syntax
(and, like in this case, even the semantics!) of function local declarations is
substantially different from global declarations and declarations inside
aggregates. It is not 'turtles all the way down', it is not consistent, and it
is not useful. Those are arbitrary limitations. I'd suspect that DMD can even
handle correctly most of the function local features that are currently invalid

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to