Position of rules definitions
kre at munnari.OZ.AU
Thu May 3 06:13:59 UTC 2007
Date: Wed, 02 May 2007 18:12:16 -0400
From: Liviu Nicoara <nicoara at roguewave.com>
Message-ID: <46390CC0.5020605 at roguewave.com>
| I find it more logical to have the
| definition of an entity before its first use.
It isn't really - in the computer world we've gotten used to it that
way because of the demands of early resource scarce parsers (and these days,
lazy ones, plus those obeying established rules of course).
In other fields, it's normal to see a reference to an object before you
seek its definition, or you never have any idea why this object is
being defined, and hence have no idea why it exists or why you'd
bother caring about its definition - after you've seen a use for the
object, you know why you need to know what it is. Definition after
use is more logical, it's just harder for the parser to cope with.
More information about the tz