[plt-scheme] mzscheme -tm- ?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Dec 14 10:37:48 EST 2007

At Thu, 13 Dec 2007 01:06:24 -0500, Eli Barzilay wrote:
> > but I'm confident that one of two things is true here:
> > 
> > a) there's some useful way to use mzscheme -tm that I'm just not  
> > aware of, or
> > b) this is not the desired behavior.
> > 
> > I'm betting on (b), but I'd be happy to be wrong.
> 
> A solution is probably for -m to not construct a function application
> using whatever #%app syntax is currently available. 

I've changed -m to use bindings from '#%kernel (for `#%app', etc.).


As you may guess, I don't use -m myself. I use `command-line', and as
of yesterday, the `scheme' module provides a slightly streamlined
`command-line' form.

So, instead of something like

  #lang scheme
  ...
  (provide main)
  (define (main src-file target-dir)
    (build-it src-file target-dir))

I'd write

  #lang scheme
  ...
  (command-line #:args (src-file target-dir)
                (build-it src-file target-dir))

Advantages include better error messages for command-line parsing,
direct support for flags, and no need for -m. Disadvantages include
having to learn a new syntactic form and more difficulty for testing.

Any better ideas?


Matthew



Posted on the users mailing list.