Time we switched to unicode? (was Explanation of this Python language feature?)
Rustom Mody
rustompmody at gmail.com
Tue Mar 25 02:10:58 EDT 2014
On Tuesday, March 25, 2014 11:17:51 AM UTC+5:30, Steven D'Aprano wrote:
> On Tue, 25 Mar 2014 14:57:02 +1100, Chris Angelico wrote:
> > wrote:
> >> What you are missing is that programmers spend 90% of their time
> >> reading code
> >> 10% writing code
> >> You may well be in the super-whiz category (not being sarcastic here)
> >> All that will change is upto 70-30. (ecause you rarely make a mistake)
> >> You still have to read oodles of others' code
> > No, I'm not missing that. But the human brain is a tokenizer, just as
> > Python is. Once you know what a token means, you comprehend it as that
> > token, and it takes up space in your mind as a single unit. There's not
> > a lot of readability difference between a one-symbol token and a
> > one-word token.
> Hmmm, I don't know about that. Mathematicians are heavy users of symbols.
> Why do they write ∀ instead of "for all", or ⊂ instead of "subset"?
> Why do we write "40" instead of "forty"?
> > Also, since the human brain works largely with words,
> I think that's a fairly controversial opinion. The Chinese might have
> something to say about that.
> I think that heavy use of symbols is a form of Huffman coding -- common
> things should be short, and uncommon things longer. Mathematicians tend
> to be *extremely* specialised, so they're all inventing their own Huffman
> codings, and the end result is a huge number of (often ambiguous) symbols.
> Personally, I think that it would be good to start accepting, but not
> requiring, Unicode in programming languages. We can already write:
> from math import pi as π
> Perhaps we should be able to write:
> setA ⊂ setB
Agree with all examples -- chinese being the best!
Something that Chris may relate to:
You type a music score into lilypond
Then call lilypond to convert it into standard western staff notation
Why not put up the lilypond (ASCII) directly on the piano/organ when you play?
This is far from rhetorical... ABC,Guido,etc (not python's!) have some
claim to be *musically* (not just textually) readable and easier to
master than standard staff notation
Still for someone
- used to staff notation
- under the standard presumptions of western music:
-- harmony
-- spelling c# ≠ d♭
-- a note is a note ie C to D is as much a note as D to E
staff notation is hard to beat
More information about the Python-list
mailing list