Paul Eggert wrote:
> * The comments in string.in.h should be imperative sentences. E.g., say 
> "Return true if ..." not "Returns true if ...". Doing it this way is a 
> bit briefer and is more likely to result in valid English sentences.

You know that I disagree with that.

The style that I am using is the industry-standard style. See: Among
10 important language and library documentations,
  - 7 use the "Returns ..." style that I favour,
  - 1 uses the imperative style that you favour,
  - 2 use other styles.

In detail:

7x "Returns ..."

  Java:
  
https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#endsWith-java.lang.String-
  Returns ...

  C#:
  
https://learn.microsoft.com/en-us/dotnet/api/system.string.endswith?view=net-9.0
  Returns ...

  GLib:
  https://docs.gtk.org/glib/func.str_has_suffix.html
  Returns ...

  JavaScript:
  
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
  Returns ...

  Common Lisp:
  
http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_stringp.html
  Returns ...

  Scheme:
  
https://conservatory.scheme.org/schemers/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.3.5
  Returns ...

  Rust:
  https://doc.rust-lang.org/std/process/fn.id.html
  Returns ...

1x imperative style:

  Python:
  https://docs.python.org/3/library/stdtypes.html#string-methods
  Return ...

2x other styles:

  ISO C:
  The function <> returns ...

  ISO C++:
  Returns: ...


Bruno




Reply via email to