Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: A question of function interface design

From: mokkel:gmx at: 19-Jan-2005 15:31

> Given that Rebol is not strongly typed, is the second of these "idioms"
I thought Rebol is strongly typed (but not statically) ... like a value has always an assigned type. About the rest: I prefer to have the interpreter checking the types of the arguments if that is wished. Actually I would like to have real support for Design by Contract (pre- and postconditions and maybe object-invariants), but I'm not sure whether that fits will with the Rebol philosophy - but however I find in principle nothing bad in having it. I know there is some old implementation of it at, but nobody seams to use it - maybe because of some other reasons ? I guess if you return 'none in case of error, that would somewhat destroy the purpose of a function (some precondition is always implied - if not explicitely stated), unless returning 'none would be raised to some standard, but then other problems occur (like Andreas Bolka stated in the other post). Maybe that's why I like the DBC approach, you just state what's else implicit in the function explicitely and the user/client of the function has to take care to fullfill the precondition and everything will work fine. Are there any comments regarding DBC being (un)useful for Rebol ? Michael