Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Do programs accept arbitrary names as properties?

    The documentation of program properties seems to imply, but does not explicitly state, that a program property can have an arbitrary name. At the same time, the manual discusses only the properties/names used by StataCorp.

    I have technically used my own property names and found this very useful. I now wonder whether allowing arbitrary property names is an intentional feature or merely an unintended consequence of the implementation. I hope it is a feature -- and, if it is not, I hope that this behavior is nevertheless guaranteed to remain valid under version control, with the usual risk that StataCorp might eventually use the same name.

  • #2
    It is intentional that program allows arbitrary names to be specified in its properties() option.

    The only restriction when adding option properties() to your program definitions is that its contents follow Stata's rules for names.

    If you have published any programs, such as in the Stata Journal or SSC, and write to us that you are using a specific name as a program property -- I believe we will respect your property name. For future program properties you intend to publish, I would recommend reaching out to Stata technical support.

    In any case, if you are worried about collisions with future versions of Stata, I would consider capitalizing your properties or using some form of prefix with an underscore "_". Internally, since these program properties have to fit within 80 characters, we will tend to use very short names and will avoid using underscore.

    Also, I would avoid using svy or sw as a prefix.

    Comment


    • #3
      Originally posted by Jeff Pitblado (StataCorp) View Post
      It is intentional that program allows arbitrary names to be specified in its properties() option.
      Thanks for getting back! This is great news.

      Originally posted by Jeff Pitblado (StataCorp) View Post
      [...]I would consider capitalizing your properties or using some form of prefix with an underscore "_". Internally, since these program properties have to fit within 80 characters, we will tend to use very short names and will avoid using underscore.
      That's what I thought. I don't think I've used properties in one of my published commands, but if I have, I'm pretty sure I've used capitalized/mixed-case, long, and somewhat awkward names.

      Comment

      Working...
      X