code is data

Paddy paddy3118 at netscape.net
Sun Jun 18 06:27:04 EDT 2006


Ravi Teja wrote:
> BJörn Lindqvist wrote:
> > > Personally, I would like to see macros in Python (actually Logix
> > > succeeding is good enough). But I am no language designer and the
> > > community has no interest in it. When I absolutely need macros, I will
> > > go elsewhere.
> >
> > One must wonder, when is that? When do you absolutely need macros?
>
> Whenever there is significant boiler plate code that functions and
> classes cannot eliminate alone.
> Whenever there is a more elegant way to express your code.
>

Me, I am torn. I should now better. I have listened to the arguments
against Macros in Python and the ones that struck home were the
argument for maintainability:
 Without macros, Python is Python. Statements do what you expect.

And the argument against DSLs altogether:
 Make Python your DSL! If you design your own DSL before long you start
to embellish it with more statements or datatypes and before long it
becomes complex. If you used Python from the beginning then you would
have a community for support.

I know the arguments, but every once in a while I think if only I could
craft my own ??? statement or ....

Don't go their Paddy.

;-)




More information about the Python-list mailing list