[racket-dev] plea for short planet syntax in student languages?

From: Stephen Bloch (bloch at adelphi.edu)
Date: Wed Oct 5 14:29:04 EDT 2011

On Oct 5, 2011, at 12:20 PM, John Clements wrote:

> Would it be difficult to support the shorter
> 
> (require (planet clements/rsound))
> 
> syntax in the student languages?

For that matter, is there any good reason to restrict the syntax of "require" at ALL in student languages?  I mean, it's not like a student is going to accidentally stumble on
	(require (prefix-in foo: (only-in bar/snark boojum glerbix)))
And even if they do, explaining that would be easier than explaining
	(require (planet "main.rkt" ("clements" "rsound.plt 2 6")))
.

A related feature request, which I've put in at least once or twice: allow students to use "require" on their OWN files, perhaps by putting an implicit "provide all-defined-out" on any file in a student language.  This is easy to motivate: I frequently give an assignment that benefits from re-using a function from a previous assignment.  It seems to me quite reasonable for a student to write

; Homework 6
(require "homework5.rkt")
...
; use functions defined in homework 5

Or perhaps even
; Homework 6
(require (prefix-in hw5: "homework5.rkt"))
...
; use functions defined in homework 5, as prefixed


Stephen Bloch
sbloch at adelphi.edu




Posted on the dev mailing list.