Re:Why I Write Games in C
by vidarh on Saturday January 09, 2016 @07:26AM
(#10871005)
I can't speak for the article writer of course, but the Python-like syntax / significant indentation would be a deal-breaker for me. I'd suffer through a lot to avoid that. And back when I used C a lot myself, I found that even more objectionable. I often care more about syntax than many other language features - with a good syntax you can sugar over a lot of other deficiencies, but a syntax you dislike will stare you in the face every moment you use the language.
[ Parent
| on HN ]
I am in some ways the same, but the other way around. I like Python-like syntax more than C-like syntax. But not to the same extreme as you, I wouldn't mind using a language with a C-like syntax.
What are your reasons for disliking Python-like syntax?
I want strong visual cues for the end of blocks most importantly. And I want the freedom to adjust indentation in ways that to me improve readability without consideration of whether or not it matches language expectations.
But also because I've yet to work in any environment where broken indentation due to tools with different ideas about how to handle it has not been a regular occurrence - indentation is brittle.
Re:Why I Write Games in C
by lobster_johnson on Saturday January 09, 2016 @04:24PM
(#10872942)
I think Haskell gets whitespace-sensitive indentation right. It is a lot less strict than Python, and if you didn't know it was whitespace-based you wouldn't necessarily realize it. Thanks to the functional nature of the language, the "hanging block" problem you have in Python (where the lack of an explicit end construct has blocks indent but never "close") doesn't really exist.
I wouldn't know - I gave up on Haskell because of the cryptic syntax long before I got to the stage of hating on smaller syntactic details... I love a lot of concepts from functional programming, but I wish I could get them in a language with a syntax more like Ruby and very much less than Haskell.
Re:Why I Write Games in C
by loup-vaillant on Saturday January 09, 2016 @12:21PM
(#10872003)
If I ever invent a language for anything more than personal use, I swear I'll provide several syntaxes, and an automatic translator. To each his own? FINE!
(I'll also shoot whoever tells me having several syntaxes is a deal breaker.)