[Fluxus] My first fluxus-powered project

Sam Tobin-Hochstadt samth at ccs.neu.edu
Thu Dec 6 08:11:54 PST 2012


On Thu, Dec 6, 2012 at 7:54 AM, Kassen <signal.automatique at gmail.com> wrote:
>
>> Maybe my code will appear very ugly to skilled racket hackers, but I
>> hope someone could find in it something interesting.
>
> Didn't look so terrible at all. What surprised me most was how you
> tend to use (define) inside of other (define) statements. I didn't
> think that was legal. You may want to look into using "let" for such
> local variables. It goes like this;
>
> (let ((x 1) (y 2) (z 3))
>         (with-state
>                 (translate (vector x y z))
>                 (build-cube)))

Actually, the Racket community has been moving more towards so-called
"internal define" style as the general rule, instead of using `let`.

Here's an (unofficial) style guide that discusses it:
http://www.ccs.neu.edu/home/matthias/Style/style/Choosing_the_Right_Construct.html#%28part._.Definitions%29

Back to lurking,
Sam



More information about the Fluxus mailing list