2009/2/5 spir email@example.com:
Le Wed, 4 Feb 2009 23:35:30 -0330, Riobard Zhan firstname.lastname@example.org a écrit :
I'm proposing to make colons optional.
def foo(x) ... return x+1
just looks sloppy to me. The colon helps show it's a definition. Perhaps this is my anglocentrism (sp?) showing, as in "Here is my function: ...". Native English speakers will notice how helpful that colon is.
Starting from this point, and looking for clarity and consistency, my wished syntactic revolution ;-) reads as follows:
I sort of like this. One-liners should be doable with "if cond then stmt else stmt" instead of "if cond: stmt". I just think it's prettier; I can't really prove this or try to convince many people. Another option would be to add "if cond then stmt else stmt", and also require a newline after a colon, though this would mentally separate the two forms of 'if'.
Eww. I'll always keep ':=' and '<-' close to my heart, but I can't envision ':' as assignment.
Yeah, yeah, yeah...the day we finally get rid of the throngs of programmers complaining that assignment is too many characters for their weak little fingers to type will also be the day we finally get 'import soul' working correctly, and never have to program again. If only....
I've always been a fan of 'is'. I think it looks nice.
-- Cheers, Leif