Skip to content

Should struct member declarations use commas instead of semicolons? #2587

Closed

Description

@alan-baker

As discussed in the February VF2F. There was more support for switching structure declarations to use commas than semicolons. This issue is to come to a consensus on that proposal.

Example:

struct S {
  a : i32,
  b : f32
};

struct T {
  x : S,
  y : vec4<f32>, // optional last comma
}

Activity

  1. added
    wgsl
    on Feb 9, 2022
  2. added this to the V1.0 milestone on Feb 9, 2022
  3. greggman commented on Feb 15, 2022

    @greggman
    Member

    Just be clear, this matches Rust, right?

  4. mehmetoguzderin commented on Feb 15, 2022

    @mehmetoguzderin
    Member

    On top of Rust, there is also the interesting case of ReScript, being OCaml-inspired in its origin, also separating fields with "," rather than ";"

  5. added a commit that references this issue on Mar 9, 2022
    2bad976
  6. kdashg commented on Mar 9, 2022

    @kdashg
    Contributor
    WGSL meeting minutes 2022-03-08
    • Needs spec!
    • MM: Would it be illegal to use semicolons then? (yes)
  7. added a commit that references this issue on Mar 10, 2022
    0ed5243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgsl

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions