W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2004

Re: variable initializer circularity needs to be defined

From: Jonathan Robie <jonathan.robie@datadirect.com>
Date: Thu, 12 Aug 2004 15:35:51 -0400
Message-ID: <411BC697.7010102@datadirect.com>
To: Per Bothner <per@bothner.com>
CC: public-qt-comments@w3.org

This is a known issue raised by a few people, and is already on our 
issues list as issue qt-2004Feb1159-01. Here's the original post:

http://lists.w3.org/Archives/Public/public-qt-comments/2004Feb/1159.html

It has not yet been closed.

Jonathan


Per Bothner wrote:
> 
> In 4.12 "Variable Declaration" we have:
> 
>   If an initializing expression cannot be evaluated because of a
>   circularity (for example, it depends on a function that in turn
>   depends on the value of the variable that is being initialized),
>   a static error is raised.
> 
> I assume "circularity" will be defined somewhere, perhaps in the
> formal semantics?
> 
> Is the following a circularity?  (I would assume so, if it is
> to be statically detected.)
> 
> module namespace a = "A";
> import module namespace b = "B";
> declare variable a:x := b:y;
> 
> module namespace b = "B";
> import module namespace a = "A";
> declare variable b:y := if (true()) then 0 else a:x;
> 
> Is this a circularity?  (I assume not.)
> 
> module namespace a = "A";
> import module namespace b = "B";
> declare variable a:x := b:y;
> 
> module namespace b = "B";
> import module namespace a = "A";
> declare variable b:z := a:x;
> declare variable b:y := 0;
Received on Thursday, 12 August 2004 19:36:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:08 GMT