[J3] [EXTERNAL] Re: Why is += missing?
Reuben D. Budiardja
reubendb at ornl.gov
Thu Sep 2 21:24:45 UTC 2021
On 09/02/2021 11:55 AM, Vipul Parekh wrote:
>
>
> On Thu, Sep 2, 2021 at 10:50 AM Reuben D. Budiardja <reubendb at ornl.gov
> <mailto:reubendb at ornl.gov>> wrote:
>
> On 09/01/2021 10:21 PM, Vipul Parekh via J3 wrote:
> >
> > Many aspects of modern Fortran (and by this I mean revisions
> starting
> > with Fortran 90) with block constructs have the look and feel of
> > technical "grammar" and as such, it is welcome to my peers and
> > colleagues. From what I have seen and learnt, I believe
> something like
> > a 'WITH` _statement _clause will go better with modern Fortran
> when it
> > comes to statement-scope association:
> >
> > with (s => 3*i+1) a(s) = b(s)
>
>
> But isn't this essentially ASSOCIATE construct?
>
> ASSOCIATE ( s => 3*i+1 )
> a(s) = b(s)
> END ASSOCIATE
>
>
> Reuben,
>
> If you look back at my note, you'll notice it was predicated on the
> notion that has been expressed in this email chain and which is also
> often seen elsewhere that ASSOCIATE is onerous, especially when the need
> for `associate-name` is a small section of code, often simply a statement.
>
> Thus the concept of statement-scope. The premise behind my `WITH`
> statement clause suggestion was to introduce something *integrates* with
> the current language *without* introducing special characters that can
> have special meaning, often depending on the context.
I am fond of special characters either. But seems to me WITH also has
"with-name", it doesn't seem to save that much typing especially for a
one-line statement.
I use ASSOCIATE construct quite a bit in my applications, and it's
usefulness is exactly because it's a block scope.
Just my humble opinion :)
Best,
Reuben
More information about the J3
mailing list