4 ms·
Ask Python dev. Most people found Python code easy to read thanks to whitespace.
by aloisdg 9y ago
Ask Python dev. Most people found Python code easy to read thanks to whitespace.
- weberc2 9y agoI am a Python dev (by day, anyway), and whitespace doesn't make Python easier to read. But Python is still much easier to read in many cases than F# because Python retains parens and commas and the single-expression lambda syntax hampers gratuitous nesting. Go and Rust are even easier to read than Python, largely thanks to curly braces. I still prefer F# to Python, but not because of the syntax. NOTE: I'm not saying C-like syntax is objectively easier to read; I'm merely (very) skeptical of the OP's claim that F#'s syntax is somehow objectively better.
- aloisdg 9y agoI am a C#/JS dev by day. In my own time, I write in F#, Python, TypeScript, C (used to), C++ (used to). I have trouble with brackets nowadays. Each time I wrote some, it feels rubbish. I should try go one day :) Note that F# is the only _truly_ (not purely) functional language I am used to.
- weberc2 9y agoI think you should learn Go, but I suspect you won't like it very much.
- goatlover 9y agoWouldn't the same argument apply to Lisp code? Parens make it easier to read than whitespace. I'm not convinced at all that's the case, as whitespace has never bothered me and it's less tokens to look at. But this is likely one of those subjective things. Some people prefer more syntax, some longer names. Some like duplicated code and some prefer it DRY.
- weberc2 9y agoMy entire point is that it's subjective. I just listed my experience to counter the author's claim (implication?) that F# syntax is objectivity better than C syntax.
- stephengillie 9y agoIt's the YAML/JSON debate - would you rather have ugly curly brackets or annoyingly-precise whitespace? Personally, I choose ugly brackets, but I know many prefer the annoying whitespace.
- aloisdg 9y agoOr Sass vs Scss. It is mostly a matter of taste.
- tonyarkles 9y agoI always find this funny, because I indent my C/JS/C#/Java/whatever-other-curly-brace code exactly the same way Python expects me to indent it, so it's never really been an issue. Every time someone complains about significant whitespace, my first reaction is "what indentation style are you using where that's an issue?!"
- weberc2 9y agoI'm the same way, but lacking curly braces hurts when you're reading long functions and trying to figure out what scope you're in. It also prevents multiline lambdas or that's the excuse anyway. I program in Python all day long and there are definitely times when delimiters are nice, but I think most people make too big a deal about it. I will also say that I still have a harder time reading a Haskell function call style than a C style.
- vorotato 9y agoYeah I frequently switch between F# and C# and I literally cannot tell a difference in effort. I assume the complaints are more out of familiarity than anything else. I have never had issues in either language.