[Prev][Next][Index][Thread]

Is this the right behavior?



In Gwydion Dylan, the program:
  
  define method foo() => ()
    #"foo";
  end method foo;
  
  define method main(appname, #rest arguments)
    let bar = foo();
    format-out("%=\n", bar);
  end method main;

compiles without errors and when run prints "#f" to standard output.

I was surprised because I had declared foo() to yield no values, and
intuitively I'd expect this code to cause an error. When I checked the
DRM, I couldn't figure out whether or not this was legal behavior.

Can anyone help un-confuse me?


Neel



Follow-Ups: