Ryan, thanks for calling this out. I just created 
https://issues.apache.org/jira/browse/AVRO-3383 to start addressing coding 
style guidelines.

We currently have the editorconfig set to the same standards as the dotnetcore 
runtime repository https://github.com/dotnet/runtime

So to answer #1, there is a baseline, but not what I would call a gold standard 
(mainly since the gold standard can change version to version of .Net).

#2, Not too far off, but we want to establish a styling pattern that can be 
potentially enforceable in the future.  In other words we need to use what the 
editor config is suggesting and then turn those suggestions into warnings or 
errors going forward.  Additionally, I don't know if there are formatting tools 
that can be put into the build pipeline to address some of these things.  I am 
sure there are, but would need to research what is out there.  I personally use 
CodeMaid which is an extension for Visual Studio.

#3 is always a question of individual PRs limited to a file or a large PR.  
With the large PRs they need to be specific to a given change (ie: spacing).  
Once I get through the majority of suggestions I will be doing an audit of the 
code end to end.   While not an easy process, I think if we can document our 
end goal we have something we can march towards so that multiple developers can 
address these issues.

In addition to this, as we make changes that could potentially be API breaking 
(ideally, we maintain backwards compatibility). We want to mark the existing 
functionality Obsolete so that those who use the library will not break, but 
get warnings that the functionality has been replaced in some way.  We may want 
to make a policy of when something actually becomes deprecated. This could be 
time based or release based.  I prefer release based, but something to add to 
the discussion.  For example marking something obsolete with a 1.12 release 
wouldn't actually deprecate until 1.14.

> On February 10, 2022 10:10 AM Ryan Skraba <[email protected]> wrote:
> 
> 
> Hello!
> 
> I just wanted to open the conversation about the c# and dotnet SDK --
> I'm definitely not the expert on this framework and I haven't had the
> opportunity to use it at all. I obviously rely on the expertise of
> our expert contributors!
> 
> It was pointed out that C# doesn't get the same attention as Java (or
> python, I imagine), and for better or worse, this has led to the
> perception that the C# implementation lags behind. We've been seeing
> a lot of discussion and PRs meant to bring up the standards of this
> SDK.
> 
> Of course, we appreciate all contributions, but I think it would be
> great to open the discussion here. Not being familiar with the dotnet
> ecosystem:
> 
> 1) Is there a gold standard for C# programming best practices and
> standards we can aim for?
> 
> 2) How far off are we? Is the current state of the C# SDK
> discouraging new contributors?
> 
> 3) Is there a good strategy that we can apply to get there?
> 
> To be clear: these are all good questions that we could ask of any
> SDK, but since we've got some interest and incoming PRs for C#, it
> would be great to hear any opinions!
> 
> All my best, Ryan
> 
> [1]: https://github.com/apache/avro/pull/1519

Reply via email to