I don't expect action or consensus on these, but I thought I get them on record by posting 1) move bitwise operators to a package and deprecate them from the language as special syntax 2) use pipes as shorthand for lambdas re: 1) bitwise operators bitwise OR is used on 61 lines in Lib/ out of 70k+ lines. There is nothing inheritly un-pythonic about bitwise operators but they don't really come up much in a high level language like python. They just seem 'extra' esp since we spell || as 'or' and && as 'and'. sets are about the only thing to usefully define __xor__ and its kind. re: 2) lambda shorthand Most people hate lambdas, but I like em. They would beat listcomps in readability if it weren't for the clunky appearance of the string 'lambda' everywhere they are used. People seem to like list comps over filter/map mainly because they save keystrokes. old shorthand lambda:foo() ||foo() lambda x:foo(x) |x|foo(x) l = [x.guy for (x) in blah] l = map(|x|x.guy, blah) l = [x for (x) in blah if x < 7] l = filter(|x|x < 7, blah) l = [x.guy for (x) in blah if x.guy < 7] l = map(|x|x.guy, filter(|x|x.guy < 7, blah)) I also like the passing-something-on implication of using a pipe character. Plus I like the left-to-right reading of map/filter over listcomps. dreaming-of-pytohn-3k-ly, -jackdied
I don't expect action or consensus on these, but I thought I get them on record by posting
I suggest that you also propose a new name for the resulting language. --Guido van Rossum (home page: http://www.python.org/~guido/)
Jack Diederich wrote:
I don't expect action or consensus on these, but I thought I get them on record by posting
1) move bitwise operators to a package and deprecate them from the language as special syntax
2) use pipes as shorthand for lambdas
Hello Jack, have you first checked your ideas with some of the nice people on c.l.py? If not, please do so. Many of us read c.l.py too. Please note, that we might even loose python-dev-elopers if this list continues to be overloaded with syntax propositions. It has happened. regards, holger
participants (3)
-
Guido van Rossum
-
holger krekel
-
Jack Diederich