Re: [dylan] Simple Reader Macros for Dylan (Possible DEP?)

Carl Gay <[email protected]>
Newsgroups gmane.comp.lang.dylan.gwydion.devel
Message-ID <CALekcH38c1GQw-3xWQAr_2NwoC0CPpxQ79Dw3=2V5JGiaPmtpQ@mail.gmail.com>
On Mon, Dec 24, 2012 at 3:55 AM, Bruce Mitchener
<[email protected]>wrote:

> I have been digging through the dfmc/reader code for a few things and
> noticed an extension that is implemented in there ...
>
> I'd seen the discussion of this feature from 1999 here:
>
>
>    -
>    http://people.csail.mit.edu/gregs/info-dylan-archive-html-1999/msg00324.html
>    -
>    http://people.csail.mit.edu/gregs/info-dylan-archive-html-1999/msg00327.html
>    -
>    http://people.csail.mit.edu/gregs/info-dylan-archive-html-1999/msg00331.html
>
> (and replies to those posts)
>
> I hadn't realized that it was actually implemented though. (See
> make-hash-literal in dfmc/reader/lexer.dylan...)
>
> Is there any interest in having a DEP written to describe this?
>
> It seems like a useful enough extension (and people seemed to agree back
> in 1999) ...
>
>  - Bruce
>


I wouldn't like to see this become an oft-used replacement for calling
foo-parser directly.  The examples given in the proposal (time, URLs,
filenames) aren't compelling at all to me.  The main cases I'd like to see
addressed are the equivalent of r"..." and """ in Python:

#r"..." and #r'...' could work as the equivalent of Python's r"..." and
r'...'.  i.e., raw strings with no escaping.  Having both single- and
double-quoted versions (plus automatic concatenation of consecutive
strings) means this works really well for regular expressions.

For multi-line strings I think the delimiter needs to be more than one
character, which is why Python's """ works so well.  Something like
#m"""...""".

Rather than changing the semantics of #(...) and #[...] shouldn't we have
immutable collections?
let foo = immutable-list(parse-time("blah"), ...);

-Carl

_______________________________________________
hackers mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.