On 04.01.2017 16:00, deadalnix wrote:

Nested import are a language simplification. Declaration can appear
anywhere, import is a declaration, the fact that import couldn't appear
anywhere was an arbitrary limitation, and removing it makes the language
simpler. As such, the burden of proof is on maintaining the limitation
rather than removing it.
...

I don't fully agree. Nested imports, the way they have been implemented, pose a new symbol hijacking hazard.

(A symbol hijacking anecdote (not directly related): https://github.com/tgehr/d-compiler/pull/1#discussion-diff-89697186L85 )

This DIP is a language addition. Therefore, contrary to nested or lazy
import, the burden of proof is on it. This DIP should be considered as
follow: how much complexity does it add and how much benefit does it
bring, compared to alternatives.

It adds basically no implementation complexity [1]. I consider the benefit real, but minor enough to oppose the DIP based on its wacky syntax.


[1] Both static if and static foreach (once it lands) need the same kind of scoping rules.

Reply via email to