Alan Manuel Gloria:
> So I'm planning this little 4x game, and of course every new 4x game
> worth its salt has user-editable rulesets, so I'm thinking of making
> t-expressions the basic syntax for rulesets.
Awesome! This is additional evidence that the notation is general. The more
uses we can show for it, the more people will want it. "Modify your reader
once, and you don't need special formats/systems elsewhere because the reader
is so general" sounds like a good argument to me.
...
> Now, the t-expressions form certainly looks quite cute:
>
> unit-type-rules
> <ScoutDrone>
> unit-class <drone>
> unit-type-name "Scout Drone"
...
> Except for two issues: I can't put empty lines between declarations,
> and I better make sure that my unit types <ScoutDrone> etc. start on
> the same indent level, even if they are several dozen lines apart.
>
> A similar issue comes up with the R6RS library form:
...
> So let me propose the indent everything symbol WHERE: "<-"
>
> library (foo bar) <-
...
> What do you think?
Two problems:
1. Bad symbol. "<-" is pretty widely used as reverse-implies, as well as
assign.
2. No way to *end* it once you start.
> Another alternative:
>
> library (foo bar) \{
...
> \}
Hmm, I'm not committing to this functionality, but that approach does look
better. In general it does deal with the "I want empty lines in my construct",
e.g., within libraries.
If we did this, we need to use symbols that are incredibly unlikely to occur
elsewhere, and are easy to parse. Not all Lisps do slashification, it's not
required in Scheme. And we'd like { and } to be delimiters; making {...}
something else is inconsistent and harder to parse.
We need to think through symbols for this idea. The < and > characters are not
delimiters in any Lisp that I know of, and they're a matched pair, something
based on them would probably work better. For example, how about <* and *> as
delimiters? The result would be:
library (foo bar) <*
...
*>
I presume the semantics would be that after <*, all the lines would start on
the left-hand side column, and that would be the equivalent of one indent from
the prevailing indent where *< happened, right? And this would only be try
outisde (...), {...}, etc.
More thoughts? Anyone?
--- David A. Wheeler
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Readable-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/readable-discuss