la-yumba / functional-csharp-code

Code samples for Functional Programming in C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Name conflicts with String and Enum

arialdomartini opened this issue · comments

When using this library, there is often the need to specify

using String = System.String;
using Enum = System.Enum;

because the library defines String and Enum, which conflict with the respective classes in System.

The two classes are meant to host some helper functions.

Maybe they can be renamed to avoid name conflicts?

I personally prefer and would recommend to use the lowercase keywords string and enum to refer to System.String and System.Enum. This is common practice and avoids the naming conflicts you mention.

I also have the same preference.
But I tried to adopt your library on some existing, huge code where String and Enum were used, and it gave me tons of conflict.
I keep thinking that using conflicting names is an unfortunate choice.