Operators for matrix: current choices (Was Matlab vs Python ...)
Paul Prescod
paul at prescod.net
Wed Jul 19 19:38:27 EDT 2000
Michael Hudson wrote:
>
> dipping in and out of this thread...
>
>...
>
> Still don't think runtime syntax extension is a good idea, but
> unfortunately we can't claim that it's impossible.
There are all sorts of linguistic tricks that are possible if you are
willing to rewrite the parser. I said that it wasn't possible with
*Python's parser*.
> What Haskell does is to declare that any sequence of characters from
> the set [!+-*/$=%] (I think) to be an operator, much the same way as
> any sequance of characters from [a-zA-Z_0-9] (ish) is a token in
> Python today.
Consider:
+-+-+-+-5
--
Paul Prescod - Not encumbered by corporate consensus
"Hardly anything more unwelcome can befall a scientific writer than
having the foundations of his edifice shaken after the work is
finished. I have been placed in this position by a letter from
Mr. Bertrand Russell..."
- Frege, Appendix of Basic Laws of Arithmetic (of Russell's Paradox)
More information about the Python-list
mailing list