I suggest we ...

Naming convention improvements

I don't think the language benefits from the use of abbreviations especially when they are not consistent. For example
type ResizeArray<'T> = System.Collections.Generic.List<'T>

I would say that should be named ResizableArray. The current naming sounds like a function. There are more examples of this type of abbreviation that I will try to add when I am reminded of them.

10 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
DonO shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

2 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • DonO commented  ·   ·  Flag as inappropriate

    What's inconsistent in this example is that array is not abbreviated to Arr. "ResizeArr" You either abbreviate or don't you don't just pick words randomly to abbreviate and leave others.

  • Jared Hester commented  ·   ·  Flag as inappropriate

    It the context of all the other collections it doesn't sound like a function. Modules requiring qualified access with the same name as the data structure they're operating over contain functions that are typically verbs.

    Map.partition
    Seq.filter
    Array.iter
    List.fold

    Furthermore the purpose of the abbreviation is to prevent collisions with the List implemented in FSharp.Core

    Other abbreviations used in core are:

    unit, ref, list, obj, exn, nativeint, unativeint, string, float32, float, single, double, sbyte, byte, int8, uint8, int16, uint16, int32, int64, uint64, char, bool, decimal, int, array, option, seq

    @Dono you haven't stated what is inconsistent about this abbreviation

F# Language

Feedback and Knowledge Base