On Wed, Jan 23, 2008 at 04:23:40PM -0500, Jonathan S. Shapiro wrote:
> The problem is that with C-style
> initialization syntax, there can be windows of time where a non-null REF
> field hasn't yet been initialized. Under these conditions, the
> compiler/runtime has nullified it in order to avoid offending the GC
> system, but it's not legal to reference it until after it has been
> properly initialized to an object reference.

A thought has just occurred to me, why not leave the Lisp-style as the
core? it seems possible to rewrite C-style initialisation into it, e.g:

  struct frub f;
  f.x = grub ();
  grumble (15);
  f.y = grub ();
  mumble (&f);

into:

  int __f_x = grub ();
  grumble (15);
  int __f_y = grub ();
  struct frub f = { __f_x, __f_y };
  mumble (&f);

I'm sure you've thought of this translation as well, but I'm interested
in knowing why you consider the C-style init sequence to be fundamental.
Matching the machine's semantics seems like an obvious candidate, but
that's never stopped computer science before :)


  Sam
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to