Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] In-line Struct Assignment #633

Open
anantajit opened this issue Apr 6, 2024 · 0 comments
Open

[Feature] In-line Struct Assignment #633

anantajit opened this issue Apr 6, 2024 · 0 comments
Labels
lang Language design

Comments

@anantajit
Copy link

As I understand the current Veryl documentation, struct assignment in Veryl cannot be done in-line and each field must be initialized separately:

struct X {
  field_1: ...,
  field_2: ...
}

...

var x: X;
x.field_1 = ...
x.field_2 = ...

I think that the following Rust-like syntax would be best for this use-case:

let x = X { field_1: ..., field_2: ... };
@anantajit anantajit changed the title [FEATURE] In-line Struct Assignment [Feature] In-line Struct Assignment Apr 11, 2024
@dalance dalance added the lang Language design label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang Language design
Projects
None yet
Development

No branches or pull requests

2 participants