hubFS: THE place for F#

. . . are you on The Hub?
Welcome to hubFS: THE place for F# Sign in | Join | Help
in Search

F# Naming Convention

Last post 08-08-2008, 10:30 by kyagrd. 7 replies.
Sort Posts: Previous Next
  •  11-20-2007, 1:55 4090

    F# Naming Convention

    Hello,
    Is there a "standard" naming convention for F#? Should the code follow the .NET naming convention or the OCaml or neither...

  •  11-20-2007, 2:27 4092 in reply to 4090

    Re: F# Naming Convention

    There is a document about naming conventions at Don Syme's WebLog: http://blogs.msdn.com/dsyme/archive/2006/12/18/DraftChaptersUpdateDec2006.aspx //Huusom
  •  11-20-2007, 2:48 4097 in reply to 4092

    Re: F# Naming Convention

    Yep, its kinda of a mixture of .NET and ocaml, tending more towards .NET. The biggest move away from ocaml is that F# tries to avoid underscores in identifier names, and I think the lack of underscores generally improves the readablity of the code. But I guess thats just my personal taste.
    Robert Pickering
    http://strangelights.com
  •  11-20-2007, 11:25 4105 in reply to 4097

    Re: F# Naming Convention

    Thanks, guys!

    I've read the document... the usage of the mixture syntax is much clearer now...

  •  07-29-2008, 1:58 6461 in reply to 4097

    Re: F# Naming Convention

    Will the rest of core library eventually get a Camel casing convention? As I find it highly inelegant to see underscore and Camel mixed together.
    I even see this mix within the same module like List.sumByFloat and List.fold_left
  •  07-30-2008, 16:54 6481 in reply to 6461

    Re: F# Naming Convention

    Hi,

    We've been looking at this issue and will be making some cleanup here in the F# CTP, especially for the inconsistencies like the one you mention.

    Kind regards

    don

  •  07-31-2008, 19:13 6496 in reply to 6481

    Re: F# Naming Convention

    dsyme:

    Hi,

    We've been looking at this issue and will be making some cleanup here in the F# CTP, especially for the inconsistencies like the one you mention.

    Kind regards

    don



    Thanks, so will that mean fold_left will become foldLeft ?
  •  08-08-2008, 10:30 6550 in reply to 6496

    Re: F# Naming Convention

    Associat0r:

    Thanks, so will that mean fold_left will become foldLeft ?

    I hope it becomes foldl as in Haskell :-)

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems