From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:343:0:b0:6a6:7895:8eaf with SMTP id 64-20020a370343000000b006a678958eafmr3709906qkd.493.1654207857981; Thu, 02 Jun 2022 15:10:57 -0700 (PDT) X-Received: by 2002:a81:7c45:0:b0:300:2f8c:7cf2 with SMTP id x66-20020a817c45000000b003002f8c7cf2mr7889112ywc.255.1654207857634; Thu, 02 Jun 2022 15:10:57 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 2 Jun 2022 15:10:57 -0700 (PDT) In-Reply-To: <87wndzt8f1.fsf@bsb.me.uk> Injection-Info: google-groups.googlegroups.com; posting-host=73.121.127.66; posting-account=JSxOkAoAAADa00TJoz2WZ_46XrZCdXeS NNTP-Posting-Host: 73.121.127.66 References: <87wndzt8f1.fsf@bsb.me.uk> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <09683835-f090-47ce-8a39-467e5fb3167an@googlegroups.com> Subject: Re: who needs types? Types makes code ugly. From: John Perry Injection-Date: Thu, 02 Jun 2022 22:10:57 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2329 Xref: reader02.eternal-september.org comp.lang.ada:63917 List-Id: On Thursday, June 2, 2022 at 10:03:00 AM UTC-5, Ben wrote: > ldries46 writes:=20 >=20 > (I don't know enough about Python's new static type=20 > syntax to know how strong that is, but it's optional anyway.)=20 I think you mean "type hints"? The compiler doesn't check even when you spe= cify the types. The typing is available for those who want to use a 3rd par= ty tool to do "stuff" with it. See the note at the top of this page: https:= //docs.python.org/3/library/typing.html The Python runtime does not enforce function and variable type annotatio= ns. They can be used by third party tools such as type checkers, IDEs, linte= rs, etc. > Haskell, for example, has strong static type=20 > checking, but a lot of Haskell is written without ever using a type=20 > because of the language's type inference mechanism.=20 Correct me if I'm wrong, but do you mean "without ever *specifying* a type"= ? Several recent languages have taken this up, including Kotlin and Rust, t= hough you have to specify some types. Even Ada 2022 offers it with the "renames" keyword. regards john perry