| (def load (file)
(w/infile f file
(w/uniq eof
(whiler e (read f eof) eof
(eval e)))))
read, if it isn't passed an eof argument, returns nil when it reaches the end of the file. If load called read until it returned nil, then a nil in the middle of a file would terminate the load, so instead load passes a unique symbol to read. Since the symbol is unique, it won't appear in the file being loaded, and is thus would be safe to use as the indicator for the end of the file.However, the symbol created by w/uniq isn't actually globally unique, it just returns a new symbol each time it's called (gs400, gs401...). Thus it is possible, if unlikely, for the "unique" symbol to appear by itself in the file being loaded, and thus to terminate the load early. Since any symbol by itself (whether called gs400 or something else) would be useless in an Arc source code file, I doubt that anyone will ever be bitten by this bug in practice. However, I mention it because someone might copy this pattern of scanning input until the end marked by a unique symbol, and maybe their input data might contain singular symbols. |