[Python-3000] symbols?

Kendall Clark kendall at monkeyfist.com
Sun Apr 16 22:34:37 CEST 2006


On Apr 16, 2006, at 4:06 PM, Guido van Rossum wrote:

> On 4/14/06, Kendall Clark <kendall at monkeyfist.com> wrote:
>> Fair enough. My primary use case is using Python as a host for a
>> Domain Specific Language. [...]
>
> Then I suggest that having a good syntax is important; you don't want
> your DSL to look ugly because that would not contribute to having fun.

Hmm, can't tell whether yr putting me on here or not, but I agree.  
Ugly syntax sucks.

> Let's assume that !foo can be used as a symbol; it's ugly but perhaps
> not too ugly; and we can pick a better character later.

Seems fine.

> I propose you
> (or someone else who would like to see this happen) an experiment:
> write a lexer + parser extension that implement this; write a symbol
> object type implementation that behave the way you want it to; and
> then use it to implement a mid-size DSL (two or three would be even
> better).

A perfectly reasonable suggestion. I like this better than writing a  
PEP. Alas, that doesn't mean I have time to do it, which sucks. I  
guess I shouldn't have proposed a feature for Py3K w/out the time to  
back it up with code.

> I know this is a lot of work to ask the proponents to do. But hey, if
> you don't want to do the work, well, I don't either, so it won't
> happen, so you certainly won't get your feature.

Not a matter of not wanting to, but rather not having time. I don't  
think this is too much to ask, actually. It's a good way to make  
these sorts of decisions; at least, it's better than endless arguing  
abstractly on this list.

> If you do the work,
> you might have to quit at any time because there's a flaw to the idea;
> that would be a useful result and you will have learned something (and
> hopefully you'll pass back the information so we'll all learn). Or you
> might end up with something so Pythonic and useful that I would be a
> dick not to accept it as a new feature. Do we have a deal?

I think it's a good idea. I'm unlikely to take you up on it due to  
lack of time. Alas. Perhaps someone else cares enough.

> PS. On my recent tendency to request code instead of PEPs, see my PS
> recently to another thread in this list.

I missed it; but I have no problem with this approach.

Cheers,
Kendall




More information about the Python-3000 mailing list