[racket] Racket style guide (was Re: Argument order conventions (was: Variable naming conventions))

From: Greg Hendershott (greghendershott at gmail.com)
Date: Fri Sep 23 19:43:06 EDT 2011

For sure, it depends. I think I remember this so distinctly because
you actually said "amen" to me, which doesn't happen every day. :)
http:[email protected]/msg02534.html

For me it was an eye-opener (coming from C/C++) that a function could
return multiple values without me absolutely having to define a struct
to do so. I recognized all those times in C/C++ that I needed to
return just 2 or 3 values, and needing to define a gratuitous struct
was as annoying as always needing to name a function. So that seemed
pretty cool. But a new hammer can elicit hallucinations of nails. So
it was also cool when I realized not to get too carried away with it.
I just thought that observation might be helpful to have in the guide,
at least for folks like me.

On Fri, Sep 23, 2011 at 6:21 PM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
> On Sep 23, 2011, at 6:15 PM, Greg Hendershott wrote:
>> This reminded me of advice on this list: Use a struct instead of
>> `values', to return from a function more than maybe 2 or 3 items. That
>> might be good to add to the guide, too?
> Depends on the situation.
> Even the struct over list advice is partial and I won't always
> do so, especially when I know that the data is entirely local
> to a module. Lists are just so convenient (have tons of functions).
> -- Matthias

Posted on the users mailing list.