Loading ...
Sorry, an error occurred while loading the content.
 

signature names conventions

Expand Messages
  • drehman27
    If the signature name of a module is conventionally written in capital letters why doesn t the Ocaml reference manual strictly adhere to this convention? What
    Message 1 of 3 , Dec 1 6:32 AM
      If the signature name of a module is conventionally written in capital
      letters why doesn't the Ocaml reference manual strictly adhere to this
      convention? What is supposed to be good style when writing programs?

      For example: Here
      http://caml.inria.fr/pub/docs/manual-ocaml/libref/Map.OrderedType.html
      we find
      module type OrderedType = sig .. end

      insted of
      module type ORDEREDTYPE = sig .. end
    • Richard Jones
      ... The only rule is that the module name has to begin with a capital letter. Personally I m glad they didn t use ORDEREDTYPE, because it s very hard to read.
      Message 2 of 3 , Dec 1 8:01 AM
        On Fri, Dec 01, 2006 at 02:32:41PM -0000, drehman27 wrote:
        > If the signature name of a module is conventionally written in capital
        > letters why doesn't the Ocaml reference manual strictly adhere to this
        > convention? What is supposed to be good style when writing programs?
        >
        > For example: Here
        > http://caml.inria.fr/pub/docs/manual-ocaml/libref/Map.OrderedType.html
        > we find
        > module type OrderedType = sig .. end
        >
        > insted of
        > module type ORDEREDTYPE = sig .. end

        The only rule is that the module name has to begin with a capital
        letter. Personally I'm glad they didn't use ORDEREDTYPE, because it's
        very hard to read.

        Rich.

        --
        Richard Jones, CTO Merjis Ltd.
        Merjis - web marketing and technology - http://merjis.com
        Internet Marketing and AdWords courses - http://merjis.com/courses - NEW!
        Merjis blog - http://blog.merjis.com - NEW!
      • William D. Neumann
        ... Because it s not really a convention? I know that they use it in the manual in section 2, but that doesn t make it gospel. It s a bit like insisting that
        Message 3 of 3 , Dec 1 8:14 AM
          On Fri, 1 Dec 2006, drehman27 wrote:

          > If the signature name of a module is conventionally written in capital
          > letters why doesn't the Ocaml reference manual strictly adhere to this
          > convention? What is supposed to be good style when writing programs?

          Because it's not really a convention? I know that they use it in the
          manual in section 2, but that doesn't make it gospel. It's a bit like
          insisting that good style is words_written_like_this instead of
          wordsWrittenLikeThis. I suppose it would be nice if the manual was more
          consistant that way, but it's not like it's something enforced by the
          language.

          William D. Neumann

          ---

          "There's just so many extra children, we could just feed the
          children to these tigers. We don't need them, we're not doing
          anything with them.

          Tigers are noble and sleek; children are loud and messy."

          -- Neko Case

          Life is unfair. Kill yourself or get over it.
          -- Black Box Recorder
        Your message has been successfully submitted and would be delivered to recipients shortly.