[J3] A couple more ideas for features
Brad Richardson
everythingfunctional at protonmail.com
Thu Apr 6 14:01:53 UTC 2023
I don't see any reason to define "^" to be exponentiation, as we already have an operator for that, "**". Would the proposal be to allow "^" as a user defined operator? I suspect that would preclude us from using it for some intrinsic operation later, so I'm not sure if it's a good idea. I don't have a strong opinion though. While we're on the subject of operators though, is there a reason "_" is not allowed in user defined operators?
For DO UNITL(...), I like the expressive/readability aspect of it, but why is DO WHILE (.not. ...) insufficient?
Regards,
Brad
On Thu, 2023-04-06 at 13:53 +0000, Clune, Thomas L. \(GSFC-6101\) via J3 wrote:
> Someone in the NASA community recently reached out to me with a few questions about the standard and potential new features. After disabusing him of the ones that seemed non starters, I’m left with 2 that I feel obligate to float with the committee.
>
> The first is a request to allow “^” as on operator. The individual actually wanted to use it for numerical exponentiation, but I considered that to be a small benefit. But it is true that Fortran has a relative paucity of symbols that can be used as operators, and most of those cannot be repurposed for use with intrinsics. I suspect with generics, there may even be increased usage of user-defined operators, but admittedly this is purely conjectural. I know we are frugal with allowing new characters, but maybe others have some solid use cases waiting to throw at this?
>
> The other request was for a DO … UNTIL(cond) to complement DO WHILE(cond) … I have no doubt that this request has come up before, so someone can quickly rattle off why it was not pursued?
>
> His other requests were all either outside the standard (command line flag to change default behavior) or were features we actually already have and the user was merely unaware.
>
> Cheers,
>
> - Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230406/df5b4db9/attachment-0001.htm>
More information about the J3
mailing list