Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
jp_sc
6y ago
0 comments
Save
Share
I would love if they added "?" to the list of valid characters for names, so I could write something like `valid?()` instead of ``is_valid()`.
0 comments
6 comments · 3 top-level
top
newest
oldest
bandrami
6y ago
· 3 in thread
just use "_P", a fairly-widely-recognized substitute from the Lisp world.
maksimum
6y ago
As a python programmer I would have no idea what `valid_P` is supposed to mean. Valid Pascals?
bandrami
6y ago
P is shaped like a question mark, though I think it was retronymed to stand for "Predicate"
1 more reply
ptx
6y ago
The suffix is just "p" in Common Lisp[1], so I think the "predicate" explanation is more likely to be correct than the visual analogy to the question mark.
[1]
http://www.lispworks.com/documentation/HyperSpec/Body/f_list...
cutler
6y ago
Or even better, just `valid?` Oh, wait .... that's Ruby.
alanfranz
6y ago
Ruby to the rescue!
j
/
k
navigate · click thread line to collapse