TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Geoff Bull <[log in to unmask]>
Mon, 1 Nov 1999 10:48:05 +1100
text/plain (19 lines)
Ben Brosgol wrote:

> 2) "Elaboration order" is more precisely defined in Java than in Ada.  In
> Ada one often has to use elaboration pragmas to avoid
> access-before-elaboration exceptions or uninitialized variables.  The Java
> analog to Ada's package elaboration is the initialization phase of dynamic
> class loading.  When a class is initialized is defined by the language
> rules.

You've gotta be kidding!
Well maybe Java elaboration order is well specified,
but neither the language or the compiler offer any help.
One has to very careful to to avoid initialisation problems
in Java programs.
(Speaking as one burnt by this problem).