Klaus Aehlig
unread,Aug 16, 2018, 10:56:02 AM8/16/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Laurent Le Brun, bazel-dev, Taras Tsugriy, Andreea-Sanziana Bican
> Shall we make more
> precise recommendations for writing types in docstrings, to ensure
> they can be properly parsed?
I know that bzl files are a bit more restricted than python, but my
experience with python is that there is little value to have parsable
doc strings, if the type system is not specified as part of the language.
Actual python programs have type constraints that that need a type
system well beyond simple types to adequately express their constraints.
This is done either to gain a some flexibility, as for the delay
argument in
http://git.ganeti.org/?p=ganeti.git;a=blob;f=lib/utils/retry.py;h=6ff45e78ab40c02967767cd364090f5ab9997850;hb=HEAD#l115
or because dependent types are used to work around the absence of a
sum type in python, as the return type in
http://git.ganeti.org/?p=ganeti.git;a=blob;f=lib/backend.py;h=58f4ebde5c46f9678a1157b19e97e7c09f0d5c0d;hb=HEAD#l5706
So I would leave it at the human-readable level. Should we go
for parsable types, we should at least make sure we chose a type
system that is capable of expressing the actual use cases in a
more meaningful way than "aribtrary types in, arbitrary type out".
Thanks,
Klaus
--
Klaus Aehlig
Google Germany GmbH, Erika-Mann-Str. 33, 80636 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Paul Terence Manicle, Halimah DeLaine Prado