Which syntax to use for field access? ===================================== See also fields_data.txt for definition syntax. # Plain syntax, but also ambiguous to the reader field # Long syntax with object always specified. # Python does this (except it's called "self") this.field # Use some short identifier for `this` _.field t.field o.field # Use some special symbol for `this` <>.field *.field /.field -.field :.field ().field ~.field 'field # Various sigills (not very intuitive) $field @field %field :field # Various strange syntaxes: (field) ..field # Prefix keyword set field = value localvar = get field # With dot but without object (could be confused with typescopes) .field = value localvar = .field # Naming convention (could be enforced by compiler) # But it is redundant when the object is specified: obj.m_field m_field = value localvar = m_field # Or prefix the local variables # (this would lead to names like `_i`) field = _value _localvar = field # Uppercase field names (would conflict with enum values, though) # Also, it's perhaps a bit too visually similar to declarations Field = value localvar = Field # Require an uppercase letter(!) within fields theField = value localvar = theField # Require an underscore(!) within fields. # And forbid _ in function parameters and local variables. # (It looks quite nice actually) # But it would prevent simple names like `x`, `y`, `left`, `enabled`, # `length`, `count`, `name`, etc. the_field = value localvar = the_field # Require absense of uppercase letter / underscore # (but then variable names like `i` would not work) field = theValue localVar = field