add "#region" like C#
You should explain in the first post what #region does, since not all know C#.
If I recall correctly, it's just a directive for the IDE that allows defining a "logical" region of source code, which the editor can, for example, collapse. It doesn't affect the actual code semantics in any way.
It should be noted also, that Rust allows already attributes using syntax #[attribute]. Maybe using the already existing attribute syntax for IDE region hints could be feasible?
You can just put it in comments as it done for C, C++, etc.
As a C# developer, the only time I've seen #region used properly was to allow you to collapse the licensing text at the top of a source file. The other 99% of the times it has been to hide the fact that the file is way too long. If your file/class/function is big enough that you need to use regions, it's past time to break things up.
lot of c# programmers discourage use of region, you can do collapsing with ide or you can split the code in files
I think this should be re-opened. There are uses for #region that aren't to "hide the fact that the file is way too long". Using #region for splitting up Public, Protected & Private members and methods helps to keep files tidy irrespective of whther they are long or short files.
As a C# developer, the only time I've seen
#regionused properly was to allow you to collapse the licensing text at the top of a source file. The other 99% of the times it has been to hide the fact that the file is way too long. If your file/class/function is big enough that you need to use regions, it's past time to break things up.
Dear Wesley Wiser,
Most helpful comment
I think this should be re-opened. There are uses for
#regionthat aren't to "hide the fact that the file is way too long". Using#regionfor splitting up Public, Protected & Private members and methods helps to keep files tidy irrespective of whther they are long or short files.