Question mark in variable and function names
Andrew Dalke
adalke at mindspring.com
Thu Oct 7 18:05:28 EDT 2004
Ville Vainio wrote:
> Abundant ! and ? characters in functions are a good reason to *avoid*
> Scheme. All that shift-pressing and noisy code doesn't suit my
> aesthetic sensibilities.
> mystruct.sortD() # destructive
>
> if symbolP(obj): ... # predicate
But that means pressing the shift key for the 'D', '(', ')'
and 'P' characters. You answer doesn't address your first
complaint.
Do you prefer Ruby's parens free call syntax? Or is it
that from practice you no longer consider '(', ')' and ':'
to be noisy?
def symbolP x
return x>0
end
if symbolP 5 then
print "Positive!\n"
end
contains less noise than
def symbolP(x):
return x > 0
if symbolP(5):
print "Positive!"
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list