From: Lazaridis Ilias Date: 2011-07-09T18:33:42+09:00 Subject: [ruby-core:37914] [Ruby 1.9 - Feature #4984] [TERMINOLOGY] Provide Document for Terminology (e.g. "Global Status") Issue #4984 has been updated by Lazaridis Ilias. =begin Lazaridis Ilias wrote: > =begin > > In order to avoid communication barriers, a document containing basic terminology should be provided (ideally directly within the source-code tree). [...] I've created a draft version of the document, this should clarify this issue: (()) =end ---------------------------------------- Feature #4984: [TERMINOLOGY] Provide Document for Terminology (e.g. "Global Status") http://redmine.ruby-lang.org/issues/4984 Author: Lazaridis Ilias Status: Rejected Priority: Normal Assignee: Category: Project Target version: =begin In order to avoid communication barriers, a document containing basic terminology should be provided (ideally directly within the source-code tree). As an example (based on an communication problem within issue #4893), this issue here attempts to define the meaning of "Global Status" (Global State) and "Local Status" (Local State), thus the result can be included in the document. Note that this is not language-specific, thus any existent standard definition should be used. A small overview, without any references to existent documentation: * Global Status (synonym: Global State) * Example 1: $call_string_initialize = true|false * This is a global status, bound to a global variable, which is accessed directly * A thread which would introduce it's own String-class-object instance, would override the behaviour of another thread * Example 2: String.call_initialize = true|false * using internally "static int call_initialize" * This is still a global status, bound to a translation-unit (string.c) variable * both examples work, if only one String-class-object is available * both examples would fail, if a program would produce somehow a 2nd String-class-object (e.g. within a thread) - * Local Status (synonym: Local State) * String.call_initialize = true|false * Using internally a class variable (either @@call_initialize_flag, or a C-low-level-flag, e.g. FL_USER18) * This is a class-local-status, bound to a class variable "global status"). * A thread which introduces in any way it's own String class, would *not* override the behaviour of the global string class, but only it's own, because "call_initialize" is a "Local Status". * IMPORTANT: * The message can be sent to the (String class) object everywhere where the String class is visible (= globally) * This fact does *not* make "call_initialize" a "global status" (otherwise *any* behaviour of class String would be =end -- http://redmine.ruby-lang.org