[plt-scheme] Specifying choice of language/version in source file

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Fri May 12 10:51:19 EDT 2006

Has anybody given thought to a way for a source file to specify which 
DrScheme language it's intended to run in?  Or, for that matter, 
which version of DrScheme it's intended to run in?

On one hand, it's sometimes nice to be able to show what happens to 
the same file in two different language subsets  or versions.  On the 
other hand, that's not a common thing to need to do; much more 
common, I suspect, is writing something which makes sense in a 
particular subset/version and not in another.

I guess if these specifications were part of the source file, they 
would have to be in a syntax that's legal in ALL of the languages, 
and I don't think there is any such thing.  So the alternative is to 
make "intended language" and/or "intended version" a property of the 
file, separate from the source code text.  It would presumably be 
lost (like graphics) when one chooses "Save as text...", but it could 
be saved as part of other files.  Would this make all such files (not 
just the ones that contain graphics) unreadable by text tools?
-- 
							Stephen Bloch
							Math/CS Dept
 
Adelphi University
 
sbloch at adelphi.edu


Posted on the users mailing list.