Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Question mark in variable and function names

Reply
Thread Tools

Re: Question mark in variable and function names

 
 
Eric Pederson
Guest
Posts: n/a
 
      10-07-2004
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
:::::::::::::::::::::::::::::::::::
 
Reply With Quote
 
 
 
 
Paul Foley
Guest
Posts: n/a
 
      10-07-2004
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>"))
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for mis-spelled variable names / function names News123 Python 2 11-26-2008 12:37 AM
To Mark Fitzpatrick, Juan Libre, Mark Rae, Steve Orr, Cowboy and other MVPs Cirene ASP .Net 5 05-17-2008 07:17 PM
confusion between global names and instantiated object variable names wanwan Python 3 10-14-2005 09:46 PM
Question mark in variable and function names Andr? N?ss Python 27 10-13-2004 07:17 PM



Advertisments