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

Comment about "View types" #4

Open
michalfita opened this issue Nov 9, 2021 · 0 comments
Open

Comment about "View types" #4

michalfita opened this issue Nov 9, 2021 · 0 comments

Comments

@michalfita
Copy link

michalfita commented Nov 9, 2021

I haven't found other way to comment https://smallcultfollowing.com/babysteps//blog/2021/11/05/view-types/, having discussion section here could help.

While the idea is noble in principle, the syntax is horrible! Please don't let it be considered in this form.

Please consider something more verbose, even the keyword to define them, something like:

struct TheType {
    element: Vec<u32>,
    option: Option<i32>,
}

view TheElementView: TheType {
   element,
}

That way then can be kept named and are much easier to read, digest, refactor, less inhibitive on the learning journey.

Maybe next step would be implementations for view types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant