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

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Tue Sep 20 04:08:03 EDT 2011

Tom McNulty wrote at 09/20/2011 01:42 AM:
> What is the Racket convention for named constants?
>   

There is no convention in Racket that I know of.  Pi can be "pi".  Max. 
packet payload byte count can be "max-packet-payload-byte-count".

I don't see constants very often.  There are many things, however, that 
a library author *could* make constant, but that instead are better made 
configurable.  So, instead of being hard-coded values in the library, 
they are instead Racket parameters, or are arguments to procedures that 
produce closures or structs.

By the way, using all capital letters in an identifier is, of course, 
reserved for syntax transformer pattern variables.

-- 
http://www.neilvandyke.org/


Posted on the users mailing list.