On Thursday, 26 April 2018 at 22:29:46 UTC, Nick Sabalausky
(Abscissa) wrote:
On 04/26/2018 01:13 PM, arturg wrote:
why do people use this syntax?
if val == someVal
or
while val != someVal
it makes editing the code harder then if you use if(val ==
someVal).
The theory goes:
A. "less syntax => easier to read".
B. "There's no technical need to require it, and everything
that can be removed should be removed, thus it should be
removed".
Personally, I find the lack of parens gives my brain's visual
parser insufficient visual cues to work with, so I always find
it harder to read. And regarding "B", I just don't believe in
"less is more" - at least not as an immutable, universal truth
anyway. Sometimes it's true, sometimes it's not.
yeah same here,
and if people find delimiters anoying, editors with syntax
highlighting can help with that by making them less visible so
the important content sticks out more.
But not having some delimiter removes the ability to edit the
text by using for exemple vims text object commands (vi(, yi[,
and so on).
In this regard, ddoc's syntax is anoying because the identifier
is inside the parens:
$(somemacro, content)
it would have been better if it was:
$somemacro(content).
Which can make html more editable then ddoc :/ as vim recognises
tags as text objects.