4 ms·
> no obsolete constructs such as gotos How do you deal with resource management? Do you create a wrapper type for those that don't have automatic destructor? (
by syockit 4y ago
> no obsolete constructs such as gotos
How do you deal with resource management? Do you create a wrapper type for those that don't have automatic destructor? (I'm surprised that stdlib doesn't provide a wrapper for files)
- milancurcic 4y agoIf you need to clear memory in the local scope, you need to deallocate a variable explicitly. Otherwise, all Fortran variables are cleared automatically when they go out of scope. One exception are Fortran pointers (different from C pointers) which are discouraged unless really necessary. We have a discussion for a high-level wrapper for files here: https://github.com/fortran-lang/stdlib/issues/14 https://github.com/fortran-lang/stdlib/issues/14. So, it's in scope we just haven't gotten far with the design and implementation.