-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GENERAL CONCEPT: How to discourage/remove implicit save & streamline variable initialization? #15
Comments
Can anyone think of additional alternatives? |
The only other thing would be the standard requiring a compiler flag to
turn off the implicit-save behaviour. This is hardly ideal and I also
doubt they would go for it.
…On 26/07/17 13:14, zbeekman wrote:
Can anyone think of additional alternatives?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHxJPaFa_iZExIfhpXzZb4CpHUUL_CQ0ks5sR3PcgaJpZM4OkOR1>.
--
Chris MacMackin
cmacmackin.github.io <http://cmacmackin.github.io>
|
Yes, since they don't even acknowledge the existence of computers or
compilers (just "processors") I see this as unlikely... But I agree, it
would be great if a flag were provided for this.
On Wed, Jul 26, 2017 at 3:03 PM Chris MacMackin <[email protected]>
wrote:
… The only other thing would be the standard requiring a compiler flag to
turn off the implicit-save behaviour. This is hardly ideal and I also
doubt they would go for it.
On 26/07/17 13:14, zbeekman wrote:
>
> Can anyone think of additional alternatives?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <
#15 (comment)>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AHxJPaFa_iZExIfhpXzZb4CpHUUL_CQ0ks5sR3PcgaJpZM4OkOR1
>.
>
--
Chris MacMackin
cmacmackin.github.io <http://cmacmackin.github.io>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAREPPwen-olKZe0YkvY18EIsHpTXgO3ks5sR42EgaJpZM4OkOR1>
.
|
2 is the way to go for the reasons stated. |
Moved Damian's comment on old closed thread here:
|
My proposal in #12 was infeasible as @milancurcic pointed out.
So far two possible options are
Make obsolescent variable initialization during declaration (because these variables get the implicit
save
attributeAdd an additional attribute to allow variable initialization during declaration that would make the variable a non-
save
d variable.In my opinion the number one draw back of Fortran is its verbosity (including a lack of generic programming facilities). Disallowing variable initialization during variable declaration (1) will necessitate an additional line of code to perform the initialization assignment, and adding an extra attribute (2) to prevent implicit
save
still necessitates more typing.Upon further consideration, (2) has now become my preference since multiple variables could be declared and initialized on the same line, requiring the addition of only 1 extra word (the new attribute). IMO this is more compatible with the "don't repeat yourself" (DRY) principle.
The text was updated successfully, but these errors were encountered: