[J3] Why is += missing?

Malcolm Cohen malcolm at nag-j.co.jp
Thu Sep 2 07:10:29 UTC 2021


Ondřej Čertík writes:

> Given the number of lines that could use +=, it seems the number of lines that could use ? is orders of magnitude less, or is that not the case?

 

Others have replied to this, but anyway:

 

Conditional expressions turn multiple statements into one expression.

As Van said, the alternatives to op= are trivial.

They are so far apart as to be not comparable in functionality.

 

Some might even disagree that “var op=expr” is clearer than “var=var op expr”.

 

> The new ? operator is exactly like in C. As a committee we have decided that was the best approach from all the alternatives.

 

Did I not mention how much I disliked the syntax the committee voted for? Not sufficiently to change my vote, but I was quite disappointed.

 

> I would encourage us to be open minded about adding +=.



I try to be open-minded about all new features, with the caveats

1.	All new features start with minus 100 points.
2.	I try to think of as many obvious problems as I can at the start, so we’re not surprised by them later. (Even so, I frequently miss problems that ought to have been obvious!)

 

Fortunately, there’s loads of time for people to think about this particular suggestion before we get to formal submission of a proposal.

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210902/d08c3f35/attachment.htm>


More information about the J3 mailing list