What's better about Ruby than Python?

Alexander Schmolck a.schmolck at gmx.net
Mon Aug 18 18:51:43 EDT 2003


"Brandon J. Van Every" <vanevery at 3DProgrammer.com> writes:

> Alexander Schmolck wrote:
> >
> > Would you still have a problem with macros in python if utilizing them
> > required some obvious and explicit mechanism (say a
> > 'use_custom_syntax' statement right at the beginning of a module that
> > wants to use macros), so that their use could easily be controlled by
> > e.g. project managers?
> 
> Yes you would.  In open source communities, you'd get different
> philosophical camps, and people in one camp would embed 'use_custom_syntax'
> in some *.h file (yeah yeah I'm a C++ programmer) that all the other *.h
> files use.

In the proposed scheme every module that wants to use custom syntax has to say
so, period. So there is no silent infestation (these syntaxes can't be
stealthily exported).

> When you grab that code, you're not really going to want to do the work of
> making more specific 'use_custom_syntax' directives, as it would break in
> all sorts of subtle ways. So now the 'culture of feature' supplants the
> culture of control. The same could happen in a big commerical project, for
> that matter. Thus it may be wise not to allow this kind of customization at
> all.

I don't really understand what you're saying. To reiterate my point: the
language could force every module that wants to use some custom syntax
internally to explicitly say so at its beginning. It would be easy (from a
technical perspective) for project managers (open source or otherwise) to only
allow certain, particularly trusted programers to create such modules or ban
them outright. Or allow the use of certain custom syntaxes but only approved
ones (created by experienced programers) and only in special situations.

Just like you wouldn't allow every second rate programmer to write the
system-critical libraries everything is built upon, you wouldn't allow just
about anybody to create their own mini-languages without a need. OTOH if that
need arises, you can get some good programmers to design the necessary syntax
transformations and I can't really see how this would be worse than having
them write some ad-hoc interpreter from scratch which likely will suffer from
an inferior design and worse reliability and performance.

'as




More information about the Python-list mailing list