title: Case Insensitive Naming Conventions
body: <p>Completely apart from the discussions about whether programming languages should be case sensitive or not <a href="https://blog.codinghorror.com/the-case-for-case-insensitivity/" rel="nofollow noreferrer">[1]</a> <a href="https://softwareengineering.stackexchange.com/questions/9965/why-is-there-still-case-sensitivity-in-some-programming-languages">[2]</a>, what would be a good naming convention for languages that are case-insensitive?</p>
  
  <p>Specifically I'm working in Fortran, but most commonly available style guides are for languages that are case sensitive, and thus recommend naming conventions like:</p>
  
  <ul>
  <li>Class/Type names are <code>CapitalizedWords</code></li>
  <li>Method/function names are <code>firstWordNotCapitalized</code></li>
  <li>Variables are <code>lower_case_with_underscores</code></li>
  <li>Constants are <code>ALL_CAPS_WITH_UNDERSCORES</code></li>
  </ul>
  
  <p>But in case insensitive languages, everything is effectively ALL CAPS, so the only way to legibly have multi-word names is <code>ALL_CAPS_WITH_UNDERSCORES</code>. So is my only option for distinguishing between the "kinds" of names to go back to Hungarian Notation?</p>
  
  <ul>
  <li>Class/Type names are <code>APPENDED_WITH_T</code></li>
  <li>Method/function/subroutine names are <code>APPENDED_WITH_{F or S}</code></li>
  <li>Module names are <code>APPENDED_WITH_M</code></li>
  <li>Variable names are <code>NOT_APPENDED</code> (and constants are just variables)</li>
  </ul>
  
  <p>Name collisions are a major problem in Fortran, since even the name of a module will cause a collision with a variable name, or a derived type name. Is this a case where, even though everyone says Hungarian notation is a bad idea, it makes sense in this instance?</p>
  
  <p>Edit:</p>
  
  <p>As a response to a comment, for example, in a case sensitive language (C++ for example) I'd be able to do something like this:</p>
  
  <p>in a file (i.e. module) called <code>Logger.cc</code>:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>class Logger {
      Logger(some type, of arguments) {...}
      log(some argument) {...}
  }
  </code></pre>
  
  <p>in another file somewhere:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include "Logger.h"
  void aFunctionThatCreatesALogger() {
      ...
      Logger logger = new Logger(with, arguments)
      ...
  }
  
  void functionThatLogs(Logger logger) {
      ...
      logger.log(thing)
      ...
  }
  </code></pre>
  
  <p>And the equivalent Fortran might look like:</p>
  
  <p>in a file (i.e. module name Logger.f90):</p>
  
  <pre class="lang-fortran prettyprint-override"><code>module Logger
  
  type Logger
  contains
      procedure :: log
  end type
  
  contains
  
  type(Logger) function Logger(some, arguments) result(logger)
  logger%some = some
  logger%arguments = arguments
  end function Logger
  
  subroutine log(logger, argument)
  class(Logger) :: logger
  type(some), intent(in) :: argument
  ...
  end subroutine log
  
  end module Logger
  </code></pre>
  
  <p>in another file somewhere:</p>
  
  <pre class="lang-fortran prettyprint-override"><code>module someModule
  
  use Logger, only: Logger, Logger
  
  contains
  
  subroutine routineThatCreatesALogger()
  type(Logger) :: logger
  ...
  logger = Logger(with, arguments)
  ...
  end subroutine routineThatCreatesALogger
  
  subroutine routineThatLogs(logger)
  type(Logger), intent(in) :: logger
  ...
  call logger%log(thing)
  ...
  end subroutine routineThatLogs
  
  end module someModule
  </code></pre>
  
  <p>but of course the name collisions between the module name, the type name, the "constructor" function, and my variable name are all a problem, because Fortran can't tell the difference between case and/or context of use.</p>
  
  <p>I fully understand that any suggestions will be highly subjective, but I'd still like to here if anybody has a better/different suggestion than Hungarian notation.</p>