On Thursday, 29 November 2012 at 14:17:40 UTC, Andrei
Alexandrescu wrote:
On 11/29/12 6:44 AM, foobar wrote:
On Thursday, 29 November 2012 at 10:25:40 UTC, Walter Bright
wrote:
On 11/29/2012 6:40 PM, Jacob Carlborg wrote:
On 2012-11-29 03:00, Walter Bright wrote:
An attribute would bring along with it the notion of having
some static
constructors care about dependencies and others not. A
pragma would be
global to the module.
Why can't the attribute be global to the module?
Because attributes attach to the declarations they enclose. A
global
attribute would be something else.
What's wrong with attaching the annotation to the module
declaration?
i.e.
@no_circular_ctors module foobar;
I think this entire approach is unprincipled (aside from
solving a problem that's not urgent and not important). We
shouldn't focus on the _syntax_ of the completely unprincipled
approach, but instead on improving it.
A possibly better approach would be e.g. to do a simple
analysis of the static constructor's use of symbols, and use
that set to decide whether two static constructors must be
ordered or not.
Andrei
Huh?
I made the exact same observation you did that module
declarations can also carry attributes. You completely ignored
the main part of my post regarding what I feel would indeed be a
better approach (IMO).
I don't understand why you bother to answer a post you haven't
bothered to read.