From c32845d507ccea7427ff729782f8062470d48e5b Mon Sep 17 00:00:00 2001 From: vis2k Date: Thu, 28 Feb 2019 12:10:21 +0100 Subject: [PATCH] Update code convention with int vs Int32 --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f59f249e9..dd3a74619 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -123,5 +123,6 @@ Start reading our code and you'll get the hang of it. We optimize for readabilit Unlike Python, C# has different ways to do the same thing, which causes endless discussions and pull requests to change from one way to the other. Let's always use the most simple, most obvious way: * **type** vs. **var**: always use 'int x' instead of 'var x'. Less guess work. Less magic. If we **always** use the proper type then we have to waste no brain cycles on unnecessary decision making. * **if** vs. **switch**: any if statement could be converted to switch and back. Again, let's not have endless discussions and use if unless _switch_ makes overwhelmingly much sense. Python doesn't have switch either, they don't have those discussions and pull requests over there. - + * **int** vs. **Int32**: use int instead of Int32, double instead of Double, string instead of String and so on. We won't convert all ints to Int32, so it makes most sense to never use Int32 anywhere and avoid time wasting discussions. + Thanks.