Y
Hacker News
new
|
ask
|
show
|
jobs
by
dugword
2135 days ago
Python already has support for optional braces.
def say_word(word): #{ print(word) #}
7 comments
quietbritishjim
2135 days ago
Very nice. But with the linked project, although the braces are optional, when you do use them I'm presuming they're checked for correctness (i.e. they match the indentation level and are properly matched).
link
wmichelin
2135 days ago
being technically correct is the best kind of correct.
link
smitty1e
2135 days ago
I had never heard "#" pronounced "optional".
OptionalTheMoreYouKnow
link
jojobas
2135 days ago
Automatically fixes mismatched braces as well!
link
makapuf
2135 days ago
You can also use #begin and #end, of course.
link
slowhadoken
2135 days ago
What??? I had no idea. You’re beautiful.
link
wutbrodo
2135 days ago
In case your not also joking, these are just comments containing braces.
link
retrac
2135 days ago
There are some functions that just aren't readable without heavy commenting.
link
slowhadoken
2134 days ago
Yup joking. I cheer people up with humor. I try to joke while I’m depressed but it just makes Me sound like an ahole.
link
polotics
2135 days ago
Sir (or Madam) you are a genius!
link