schemy icon indicating copy to clipboard operation
schemy copied to clipboard

'None' class conflicts with typical F# code

Open vivainio opened this issue 6 years ago • 2 comments

None is a heavily used word in F# (https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/options)

If you do "open Schemy" in any F# program, it will almost certainly break because CommonTypes.cs defines it as a public class. Please consider changing the name.

vivainio avatar May 12 '18 16:05 vivainio

Thanks. I could put common types under a more specific inner namespace, like Schemy.Types. Or, ideally, I need to think about if I really need this type None - currently, None and () are used quite interchangably in Schemy. And I think () is used to mean null or "empty" in Scheme in general. So maybe I should consolidate it with ().

kflu avatar May 12 '18 17:05 kflu

I'm not sure what "empty in general" would mean. () is specifically the empty list (as opposed to the empty vector or the empty string or whatever). It would probably be more Schemey, as opposed to Schemy :-), to call the class EmptyList. Scheme doesn't have any concept of null or None, although when interfacing with SQL it is not uncommon to use the Scheme symbol null for the purpose, since SQL has no notion of symbols.

johnwcowan avatar Jan 13 '20 17:01 johnwcowan