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.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Ben Newsgroups: comp.lang.ada Subject: Re: who needs types? Types makes code ugly. Date: Thu, 02 Jun 2022 16:02:58 +0100 Organization: A noiseless patient Spider Message-ID: <87wndzt8f1.fsf@bsb.me.uk> References: MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="ea953ea4e13a7153dd12a20c97dd3fa2"; logging-data="18220"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jIu+tkmvRzyhhKU7Ao5XyC17+YiQbJcI=" Cancel-Lock: sha1:ITFWHHw/PdNAG8QM7tXjtnXQ0Xk= sha1:t2YTHBl2BKFjprXA1q/8V0i7e9M= X-BSB-Auth: 1.74cfa76f12e8dba2d338.20220602160258BST.87wndzt8f1.fsf@bsb.me.uk Xref: reader02.eternal-september.org comp.lang.ada:63915 List-Id: ldries46 writes: > As someone who has been programming since 1966 I used several > different languages, Algol 60, Fortran, Basic, C/C++ and Ada, I like > using strong types because the most ugly faults you can create are the > ones where you by accident use different types in the input or the > output of a formula. The terms being using in this thread might need to tightened up a bit because I think you are talking about strong /static/ typing. Python is strongly typed (though exactly how "strong" is debatable) but the checking is at run-time, so you have to rely on testing rather than the compiler. (I don't know enough about Python's new static type syntax to know how strong that is, but it's optional anyway.) Also, the OP is talking about removing all those messy types, and that's not necessarily the same as removing type checking, either static type checking or at run-time. Haskell, for example, has strong static type checking, but a lot of Haskell is written without ever using a type because of the language's type inference mechanism. -- Ben.