[plt-scheme] modules 4 newbies

From: Matt Jadud (jadudm at gmail.com)
Date: Thu Oct 16 17:01:33 EDT 2008

On Thu, Oct 16, 2008 at 4:15 PM, Raoul Duke <raould at gmail.com> wrote:
> (if the PLT group can do anything to make the stuff show up better in
> google, however, that would probably be good for newbies ;-)

Another hint:

#lang scheme

sets the language of the module you are writing. Good.

Now, if you want to include some libraries, you can do that:

(require net/url)

would load the "url" library in the "net" collection into your module.
Likewise, you can load the GUI stuff in as well.

(require mred/mred)

At that point, I think you can write things like

(define f (new frame% (label "Hi")))
(send f show #t)

and get an empty frame on the screen.

So, if you've been reading about namespaces, go ahead and relax: it
doesn't require that level of complexity so soon! Really, your module
language is likely to be "scheme" or "scheme/base", and from there,
you can require in the pieces that you need. Or, as has been
mentioned, you can use some of the other language combos (eg.
scheme/gui) which, I imagine, is effectively the same as requiring in
the appropriate libraries.

I'd also follow the advice of the previous posters about the
documentation, how to search it reliably, and so on.


Posted on the users mailing list.