Post #2234872
2026-05-05 22:25 UTC
@scrabsha@hachyderm.io nice article!! Genuine question about the syntax: do you think it's still readable even if there're a few fields with long names and multiple views for a few arguments? With no knowledge of the topic I would have expected a "fn ... with ..." syntax, in addition to inline, because it seems it might become verbose and it might impair seeing the whole function signature at a glance.
Replies (1)
-
@scrabsha@hachyderm.io 2026-05-05 22:51
@akiross@mastodon.social I did not consider long fields when writing this. perhaps that can be solved by allowing views in type aliases? for instance ```rust type Foo_ = Foo.{ very_long_field_1, very_long_field_2 }; ``` that or view groups (there's a thread somewhere in the rust-lang Zulip about this, I forgot to bookmark it ๐๐). i don't know what to think about the syntax you proposed. i care about "what we should use this for" much more than "what this should look like".