Orion Pobursky Wrote:Allen Smith Wrote:I don't consider leading whitespace on a line to be valid.
Why not? Indentation for clarity, separation of blocks of code, etc... is used all the time. I think this is an unnecessary restriction that most users will simply ignore.
There's no danger of this ever becoming a restriction, because it was pointed out to me the practice is both existing and widespread.
FWIW, I had always been under the impression that the linetype number was supposed to be the first thing on the line. That impression was based on the fact that files generated by GUI editors (which are pretty much the only files I ever look at) never have leading space, and the fact that LDraw has little-to-no block or control syntax which gives rise to indentation. I erroneously assumed the language would have been implemented as trivially as possible, given that it has simple syntax (the spec didn't say otherwise). At an even deeper level, I honestly never can imagine LDraw as a format anyone would ever dream of writing by hand (although I know lots of people do it). I find the format very hostile to hand-authorship.
I do think it's kind of ironic that people use (and are very concerned about having) leading space in files for readability purposes, but absolutely despised the way Bricksmith used to format lines into fixed-space columns for readability. I always thought columnization transformed LDraw files from illegible globs of numbers into something I at least had a fighting chance of interpreting. But long-time LDraw people complained about it to no end, and now it's gone.
Allen