Skip to content

Allow object."field" syntax? #7722

Description

@Simn
  1. After drugging Nicolas with painkillers and wine, he was open to the idea of allowing object."field" as a syntax. This would make it easier to use externs that have field names which are keywords in Haxe or invalid syntax in some other way. Nobody really likes how this looks, but it seems to be the most practical solution.

  2. Nicolas also suggested that we should be Koreancoherent and allow this at field-declaration-level.


See HaxeFoundation/haxe-evolution#32 for a related discussion. One open question is if we should restrict this to only " instead of ' so people don't get the idea to use interpolation there. However, I don't know what to tell the guys who think var s:String = "abc"; field.s = true; would generate field.abc after this change because that's just pure insanity to me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions