chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for review


From: Vasilij Schneidermann
Subject: Re: Request for review
Date: Fri, 14 May 2021 22:26:57 +0200

Hello Arnaud,

> I have started a small project whose purpose is to simulate Darwin's
> theory and I would really appreciate some code review from more
> experienced scheme developers, esp. when it comes to structuring,
> idiomatic code patterns, egg definitions...

I'd generally recommend studying Riastradh's style guide [1]_. That
aside:

- Stick closing parentheses together.
- No need to use begin in let and let*, it's doing an implicit begin.
- Why bind variables with let, then immediately set! them? For
  side-effectful values I'd just use let* with the corresponding
  expression.
- print takes several arguments, so no need to string-append them.
- Consider doing some basic encapsulation by writing
  constructor/accessor procedures, that makes swapping out the
  implementation a lot easier. SICP has a bunch of things to say on the
  topic.

[1]: https://mumble.net/~campbell/scheme/style.txt

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]