Closed bernardnormier closed 1 year ago
I'm fine with this new style, but just for context, we do already have a preferred formatting: The leading space should always be omitted, and the trailing space should always be present. For data members and inheritance and anywhere a single colon is used.
This style is: 1) More consistent (since it's the same everywhere) 2) What Rust does (see: https://doc.rust-lang.org/rust-by-example/trait/supertraits.html)
I understand the proposed format is common in C#, but since we've moved the syntax of Slice away from C# and towards Rust, following the Rust style made more sense. But again, Slice is it's own language and can use whatever syntax, just wanted to explain the reasoning behind the current style and make sure everyone knew it wasn't an arbitrary choice.
This was implemented in #607 and https://github.com/icerpc/icerpc-csharp/pull/3324
In Slice, we use
:
between a name and a type in parameters, return elements and fields. In this case, there is no space after the name, for example:We also use
:
for inheritance: interface inheritance, class inheritance and to specify an enum underlying (backing?) type. In this case, there is a space before the:
, for example