<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Python has optional type annotations. There are batch tools (e.g.,
MyPy) to do type analysis and IDE's also provide help. Example:<br>
<br>
def greeting(name: str) -> str:<br>
return 'Hello ' + name<br>
<br>
I found Python to be an enormous improvement over Perl for writing
the kinds of things I used to write in Perl, with the Perl book at
my side. I currently make my living working on Python for
microcontrollers. Neverthless, I am fond of type checking too, and
if I were writing a large Python system, I would use type
annotations.<br>
<br>
I have used BCPL too, in the 70's, and we achieved some measure of
type safety by careful naming.<br>
<br>
Dan H.<br>
<br>
<div class="moz-cite-prefix">On 8/3/23 10:19, Bakul Shah wrote:<br>
</div>
<blockquote type="cite"
cite="mid:A4E0BE3B-0798-417F-9EC5-86760B8C5DC1@iitbombay.org">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
I have not heard such horror stories about Common Lisp (or may be
I have forgotten them!). My impression is that python doesn't
quite have the kind of {meta,}programming tools Common Lisp has.
CL has been used for large critical programs. Perhaps Von Rossum
had more experience with statically typed languages than Lisp
(because -- pure speculation here -- if he had used CL enough, he
would never have designed python :-)
<div><br>
</div>
<div>
<div>
<blockquote type="cite">
<div>On Aug 3, 2023, at 1:32 AM, Rob Pike
<a class="moz-txt-link-rfc2396E" href="mailto:robpike@gmail.com"><robpike@gmail.com></a> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div dir="ltr">
<div class="gmail_default"
style="font-family:arial,sans-serif">I once inherited
maintenance of a critical piece of infrastructure
written in exquisitely well written, tested, and
documented Python. I mean it, it was really really
good.</div>
<div class="gmail_default"
style="font-family:arial,sans-serif"><br>
</div>
<div class="gmail_default"
style="font-family:arial,sans-serif">It crashed about
once a week and I had to fix it over and over because
in those exponentially vast combinations of paths
through the code would arise yet another way to turn a
string into a list, or something analogous. It was
hell.</div>
<div class="gmail_default"
style="font-family:arial,sans-serif"><br>
</div>
<div class="gmail_default"
style="font-family:arial,sans-serif">Critical code
needs static typing.</div>
<div class="gmail_default"
style="font-family:arial,sans-serif"><br>
</div>
<div class="gmail_default"
style="font-family:arial,sans-serif">-rob</div>
<div class="gmail_default"
style="font-family:arial,sans-serif"><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Aug 3, 2023 at
1:56 PM Bakul Shah <<a
href="mailto:bakul@iitbombay.org"
moz-do-not-send="true" class="moz-txt-link-freetext">bakul@iitbombay.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">python can
certainly implement tail call optimization (TCO).
Pretty much any language can implement TCO but for
some reason people think such programs are harder to
debug (and yet they don't similarly complain about
loops!). The beauty of Scheme was that it *mandated*
tail recursion. <br>
<br>
> On Aug 2, 2023, at 8:24 PM, George Michaelson
<<a href="mailto:ggm@algebras.org" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">ggm@algebras.org</a>>
wrote:<br>
> <br>
> Tail recursion not lazy eval.<br>
> <br>
> I wish words meant what I meant "inside" when I
think them, not<br>
> "outside" what they mean when I write them.<br>
<br>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>