WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #37699, comment 86


Ignore:
Timestamp:
09/08/2016 07:45:13 AM (3 years ago)
Author:
jacobsantos
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37699, comment 86

    initial v1  
    4848-----------
    4949
    50 As an aside, I understand that in some languages, globals are a thing and they are fine. Go uses globals and they are great. Part of the reason they are fine is because they are per file. I don't believe you can have a global that is entire application wide, unless you started playing with memory management. Other languages have likewise gotten passed the global issue by not allowing variables to be accessed passed the module barrier. If you access a module global, then you meant to access it.
     50As an aside, I understand that in some languages, globals are a thing and they are fine. Go uses globals and they are great. Part of the reason they are fine is because they are per module, which come to think of it, could be pretty bad. I don't believe you can have a global that is entire application wide, unless you started playing with memory management. Other languages have likewise gotten passed the global issue by not allowing variables to be accessed passed the module barrier. If you access a module global, then you meant to access it.