[racket] #lang racket vs. racket/base

From: Greg Hendershott (greghendershott at gmail.com)
Date: Wed Feb 12 08:26:07 EST 2014

Although I could be mistaken about any/all of the following, I'll go
out on a limb -- and once there, jump up and down.

> < "#lang racket" is for demos, IMHO; I *always* use "#lang racket/base"
> < for any code that's not a demo.
> Question: What are the advantages of doing requires explicitly?

I'm under the impression that the advantages are (a) faster load time
and (b) smaller memory footprint.

> The resulting executable (created by raco exe...) had the same size.

It should have a smaller size.

But also:

My impression is that `raco exe` predates the rise of "scripting
languages" like Python and Ruby, in which it's common to tell users,
"Make sure you have version X of Python or Ruby, then install my app".

To be clear, I'm not saying Racket is "just a scripting language". And
I'm not saying that it's wrong for someone to want "an executable" if
they need that for a certain situation. But I am speculating that
fewer users will expect it (for some definition of "users") these

Finally, a lot of work over the past year+ went into a new package
system for Racket. Not only is this for third party libraries, it's
for huge swaths of Racket itself. (IOW almost no distinction between
"third party" and "Racket lib".)

Given that, you could have people install a very minimal Racket core,
and then install your package -- during which the package manager will
download/install only what else is needed by your package.


Just as I was about to hit send, Matthew's post arrived. I'll post mine anyway.

Posted on the users mailing list.