[racket-dev] open untagged files in blank language level?

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Oct 7 10:06:29 EDT 2011

Three hours ago, Robby Findler wrote:
> On Thu, Oct 6, 2011 at 10:37 PM, Stephen Bloch <bloch at adelphi.edu> wrote:
> >
> > How about this: when you open an existing file that has no
> > prologue or #lang, it opens in "text mode": the Check Syntax and
> > Run buttons are both disabled.
> 
> Another possibility: it could open in the 'not a language' language
> that you get if this is the first time you've started drracket (if
> it has been a while since you've seen this mode, you can move your
> preferences out of the way and restart drracket to see it again).

If you do either of this -- one way to avoid a worse interface for
people who are used to open some random file and then run it is to
detect when a `#lang' was inserted at the top and switch to the "use
language declared in source" langugae when that happens.

This could actually be done for student languages also, with a minor
change of popping up some dialog saying "are you sure that you know
what you're doing?".

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.