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

Re: [plt-scheme] eval question

Title: Re: [plt-scheme] eval question
> >(with-input-from-file path
> >   (lambda ()
> >     (eval (read))))

Of course, I'll do this with load as was promised and is much simpler,

> Not only does this strike me as a bad idea from a
> thinking-about-your-program-and-documenting-it-clearly standpoint,

what, exactly, should be documented? What this little bit of code does
is perfectly clear from an R5RS point of view.

What's not documented is the settings that are stored in the file that you're loading. I can see this causing a bunch of problems down the line. Let me use the first person, to make this less acerbic. I've written code like this before, and I always end up forgetting what settings were in the file, and having to go back and check it.  If I have more than one such file, I'm really in the soup.

In essence, I think a solution using modules (or units, if you prefer them) is more robust and inherently better-documented.

You'll have to pardon my knee-jerk reaction; I've just spent a few weeks grading assignments for our software design class, and I've seen a lot of extremely non-portable, non-modular, non-documented, poorly designed code.

john clements