Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Question mark in variable and function names (http://www.velocityreviews.com/forums/t336636-re-question-mark-in-variable-and-function-names.html)

Eric Pederson 10-07-2004 05:11 AM

Re: Question mark in variable and function names
 
Andr? N?ss wrote:

>
> One thing I liked about Lisp was the ability to use the question mark
> (and the exclamation mark) in function names. I found this
> particularily useful when checking boolean properties of a object like
> for example myObj.isContextSet. It just feels so much more natural to
> write myObj.contextSet?
>
> I also found it neat that destructive operations were clearly marked
> with !.



I guess any programmer who likes LISP has an extra gear in their gear box (perhaps), but I think non-alphanumeric symbols in names reduce the readability. We live in a world of text where words have letters in them, and punctuation means something different. When I see punctuation my brain goes "STOP. ABSORB SOME LOGIC BEFORE PROCEEDING."

sorry for the caps, but to my mind's eye punctuation symbols in names is like e-mail in all caps.


> Is there anything preventing this from being possible in Python?
>



Maybe the desire to have visually clean code?

I think underneath it all some Python programmers really _miss_ the semicolon, and are dying to work more punctuation into the language to make it seem more complicated. Then it will look more impressive.

<tongue_in_cheek />




Eric
:::::::::::::::::::::::::::::::::::
domainNot="@something.com"
domainIs=domainNot.replace("s","z")
ePrefix="".join([chr(ord(x)+1) for x in "do"])
mailMeAt=ePrefix+domainIs
:::::::::::::::::::::::::::::::::::

Paul Foley 10-07-2004 08:44 AM

Re: Question mark in variable and function names
 
On Wed, 6 Oct 2004 21:11:41 -0800, Eric Pederson wrote:

> Andr? N?ss wrote:
>>
>> One thing I liked about Lisp was the ability to use the question mark
>> (and the exclamation mark) in function names. I found this
>> particularily useful when checking boolean properties of a object like
>> for example myObj.isContextSet. It just feels so much more natural to
>> write myObj.contextSet?
>>
>> I also found it neat that destructive operations were clearly marked
>> with !.


> I guess any programmer who likes LISP has an extra gear in their gear box (perhaps), but I think non-alphanumeric symbols in names reduce the readability. We live in a world of text where words have letters in them, and punctuation means something different. When I see punctuation my brain goes "STOP. ABSORB SOME LOGIC BEFORE PROCEEDING."


Yes, so do I. I /hate/ that convention (of *SCHEME*, not Lisp, note!)

[Not to mention that it's not pronounceable]

--
Malum est consilium quod mutari non potest -- Publilius Syrus

(setq reply-to
(concatenate 'string "Paul Foley " "<mycroft" '(#\@) "actrix.gen.nz>"))


All times are GMT. The time now is 07:15 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57