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=1.8 required=3.0 tests=BAYES_50,FORGED_GMAIL_RCVD, FREEMAIL_FROM,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: who needs types? Types makes code ugly. Date: Thu, 02 Jun 2022 10:28:44 -0700 Organization: None to speak of Message-ID: <87h753rn3n.fsf@nosuchdomain.example.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="7dd4c2691fec067ec315f296d0bc9541"; logging-data="15517"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7cuzirOrOO6Ensf8EegDt" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:ZnmtzmQV4ZjYHT2BoHOiuq+oF28= sha1:KM+dfUZgOjj2x1eA+BAIdwvnqwE= Xref: reader02.eternal-september.org comp.lang.ada:63916 List-Id: "Nasser M. Abbasi" writes: > So Ada had it wrong all the time it seems. From > > https://python.land/python-tutorial > > ------------ > In a strongly typed language, you need to specify the exact > type of each variable, like String, int, and float. It > gets even uglier when objects are involved. > > Now let’s look at Python variables. In Python, we can do > exactly the same without types: > > my_name = "Erik" > my_age = 37 > my_salary = 1250.70 > > As you can see, the Python variant is a lot cleaner and easier on the eyes! > ---------------------- > > And about possible error, they defend this by saying: > > -------------------------- > In addition, you’ll find out soon enough during testing > and fix the error before the software ever goes to production. > --------------------------- That's just one tutorial. It likely doesn't reflect the views of most Python programmers. The "python.land" site has no official connection And for what it's worth, Python 3.5 added support for "type hints". https://docs.python.org/3/library/typing.html -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */