# Why do we need TYPEOF?

**URL:** <https://fortran-lang.discourse.group/t/why-do-we-need-typeof/9454>\
**Category:** Language enhancement\
**Created:** [March 22, 2025, 6:13pm UTC](https://fortran-lang.discourse.group/t/why-do-we-need-typeof/9454 "2025-03-22T18:13:47Z")\
**Posts on this page:** 1\
**Showing post:** 49

<div class="post-metadata">

**Author:** ![MarDie](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/mardie/32/54_2.png) [@MarDie](https://fortran-lang.discourse.group/u/MarDie)\
**Post date:** [April 1, 2025, 3:44pm UTC](https://fortran-lang.discourse.group/t/why-do-we-need-typeof/9454/49 "2025-04-01T15:44:10Z")

</div>

`implicit none` is a good start, it is especially annoying for interfaces.  
**B.3 Obsolescent features** contains already a list of features that are identified as outdated, the most “popular” ones are probably common blocks and fixed form.  
A clear procedure with a clear deadline (e.g. next standard revision) for removal would IMHO be better than waiting until almost everyone found the time to modernize their codes.

Consistency of type/rank/kind as discussed here is also something that should be fixed. Too bad that `typeof` made it into the standard, but even worse if this glitch will stay forever. Yesterday I’ve started discussion on [Interface definitions for assumed size arrays](https://fortran-lang.discourse.group/t/interface-definitions-for-assumed-size-arrays/9522), also something that could be improved. Maybe there is no better solution, but knowing that I won’t be fixed even if there would a solution that is superior in all aspects but backward incompatible is weird.

I also agree with the [Zen of Python](https://peps.python.org/pep-0020/): “Namespaces are one honking great idea – let’s do more of those!” and would like that `use math` makes functions available as, e.g, `math%eigenvalues` instead of cluttering my namespace. Compatibility with existing code would then require something like `use math as *`. Of course, one could make the better option opt-in (as with `implicit none`) but I think a good language has reasonable defaults and the option to do stupid things instead of stupid defaults and the option to do things right.

Edit: I forgot the newest flaw `enumeration` and `enum`: [Flaw with typed enumerators in F202X](https://fortran-lang.discourse.group/t/flaw-with-typed-enumerators-in-f202x/3429). This should be straightened before the new feature finds widespread use.

---

_[View the full topic](https://fortran-lang.discourse.group/t/why-do-we-need-typeof/9454)._
