Re: Dylan stuff
Hannes Mehnert <[email protected]>
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 17/01/2013 09:25, mikel evins wrote: > > On Jan 17, 2013, at 2:22 AM, Bruce Mitchener wrote: > >> The main thing missing there is having names for the return values >> (which have no meaning and are largely for documentation value). > > It would be easy enough to do that, too: > > (define sealed method foo ((x <fixnum>)(y <fixnum>)) => ((answer > <fixnum>) (success? <boolean>) #rest more-parts) (begin > (do-stuff-to-x) ...)) > > The only issue, really, is whether that's better or worse. In favor, > it adds more information about the programmer's intentions. Opposed, > it makes things quite a bit more verbose, and the additional names > have no functional use. my experience is that it is hard to explain/justify to other programmers why there are unused names for return values. Also, when writing code myself I most of the time use "res" or "result" as return names, which is pretty useless for documentation purposes. So, overall I wouldn't bother with names for return values. Cheers, Hannes _______________________________________________ hackers mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/hackers