Re: [pure-lang-users] Proposed syntax changes
Status: Beta
Brought to you by:
agraef
From: John C. <co...@cc...> - 2008-08-14 21:47:23
|
Albert Graef scripsit: > That sequencing operator should be easy to implement, but how should it > be named? We can't use Q's '||' because that's logical or in Pure, and > we can't use C's ',' because that's Pure's tupling operator. Another > obvious choice would be the Haskell'ish monadic sequencing operator '>>' > but that's currently used for bit shifts (maybe I could rename '<<'/'>>' > to shl/shr, though). Any other ideas? How about -> ? > Finally (this is not a syntax change, but it also breaks backward > compatibility), I'd like to revise the script search. Currently the > interpreter always searches the current directory and then the PURELIB > directory. In the case that the interpreter is run with a main script > (pure -x main.pure), I think it makes sense to search the directory of > the main script instead of the cwd (for scripts loaded with a 'using' > clause). That would make it possible to install the main script along > with any other non-library modules it needs into its own directory and > run it from there. This would be useful, in particular, for "shebang" > scripts. The sequence used by gcc is: 1) the directory from which this file was loaded (which may itself be a file loaded by includes) 2) the process working directory 3) specified directories with -I 4) specified directories in the environment variable *_INCLUDE_PATH 5) the system directories -- Only do what only you can do. John Cowan <co...@cc...> --Edsger W. Dijkstra's advice to a student in search of a thesis |