Re: [Python-ideas] allow `lambda' to be spelled ?
`def` is a much more readable alternative, which will be more familiar to newcomers. The expression/block ambiguity can be resolved using different token instead of colon (perhaps := or an arrow). I can't understand the reaching for the Greek letter - it is a computer-science specific term with no intuitive meaning. On Thu, Jul 14, 2016 at 4:49 PM <python-ideas-request@python.org> wrote:
Send Python-ideas mailing list submissions to python-ideas@python.org
To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/python-ideas or, via email, send a message with subject or body 'help' to python-ideas-request@python.org
You can reach the person managing the list at python-ideas-owner@python.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Python-ideas digest..."
Today's Topics:
1. Re: allow `lambda' to be spelled ? (David Mertz) 2. Re: Use unbound bytes methods with objects supporting the buffer protocol (Nick Coghlan) 3. Re: allow `lambda' to be spelled ? (Random832) 4. Re: allow `lambda' to be spelled ? (SW) 5. Re: allow `lambda' to be spelled ? (Chris Angelico) 6. Re: allow `lambda' to be spelled ? (SW)
----------------------------------------------------------------------
Message: 1 Date: Wed, 13 Jul 2016 23:39:26 -0700 From: David Mertz <mertz@gnosis.cx> To: "Steven D'Aprano" <steve@pearwood.info> Cc: python-ideas <python-ideas@python.org> Subject: Re: [Python-ideas] allow `lambda' to be spelled ? Message-ID: < CAEbHw4aVKCXLu2DC7K6ArxVHAjOkc15yk+irtPKfBa5xEy0G2A@mail.gmail.com> Content-Type: text/plain; charset="utf-8"
On Wed, Jul 13, 2016 at 7:44 PM, Steven D'Aprano <steve@pearwood.info> wrote:
- suppose that reading ? has a *tiny* benefit of 1% over "lambda" (for those who have learned what it means); - but typing it is (lets say) 50 times harder than typing "lambda"; - but we read code 50 times as often as we type it; - so the total benefit (50*1.01 - 50) is positive.
I actually *do* think ? is a little bit more readable. And I have no idea how to type it directly on my El Capitan system with the ABC Extended keyboard. But I still get 100% of the benefit in readability simply by using vim's conceal feature. If I used a different editor I'd have to hope for a similar feature (or program it myself), but this is purely a display question. Similarly, I think syntax highlighting makes my code much more readable, but I don't want colors for keywords built into the language. That is, and should remain, a matter of tooling not core language (I don't want https://en.wikipedia.org/wiki/ColorForth for Python).
FWIW, my conceal configuration is at link I give in a moment. I've customized a bunch of special stuff besides lambda, take it or leave it:
http://gnosis.cx/bin/.vim/after/syntax/python.vim
-- Keeping medicines from the bloodstreams of the sick; food from the bellies of the hungry; books from the hands of the uneducated; technology from the underdeveloped; and putting advocates of freedom in prisons. Intellectual property is to the 21st century what the slave trade was to the 16th.
participants (1)
-
אלעזר