3 ms·
`end` as block delimiter makes much noise. Python code looks clean because it only uses indentations to delimit blocks. But this makes it at least difficult to
by chkas 8y ago
`end` as block delimiter makes much noise. Python code looks clean because it only uses indentations to delimit blocks. But this makes it at least difficult to refactor the code and to reformat it automatically.
- vanderZwan 8y agoI'm not sure why you are downvoted. Your statement is just an opinion, but it's your language and you are perfectly entitled to aesthetic judgements like that. The . kind of reminds me of Smalltalk, which uses it to end statements (instead of the ; we all know from other languages at the time)
- pmarreck 8y agoErlang also uses the . to end statements.
- coder543 8y agoFrom my experiences working with beginners, I think the keyword "end" would be more clear to them. It would be great to have it as a synonym for ".", if nothing else. I think we can all agree that what constitutes "line noise" is pretty subjective.
- oliv__ 8y agoI agree with the parent, but for visual reasons: I think the dot is easily missed/forgotten when quickly glancing at your code, and that there is a visual imbalance between a 5 character starting statement (while) and a single character to end the block (the dot likely being the tiniest character available on top). Just my 2c
- hcs 8y agoIt's an interesting compromise, I think you've done a good job with it.