From: Ben <ben.usenet@bsb.me.uk>
Subject: Re: who needs types? Types makes code ugly.
Date: Fri, 03 Jun 2022 01:02:27 +0100 [thread overview]
Message-ID: <87fskmty0c.fsf@bsb.me.uk> (raw)
In-Reply-To: 09683835-f090-47ce-8a39-467e5fb3167an@googlegroups.com
John Perry <devotus@yahoo.com> writes:
> On Thursday, June 2, 2022 at 10:03:00 AM UTC-5, Ben wrote:
>> ldries46 <bertus...@planet.nl> writes:
>>
>> (I don't know enough about Python's new static type
>> syntax to know how strong that is, but it's optional anyway.)
>
> I think you mean "type hints"? The compiler doesn't check even when
> you specify the types. The typing is available for those who want to
> use a 3rd party tool to do "stuff" with it. See the note at the top of
> this page: https://docs.python.org/3/library/typing.html
Thanks. As I said, I haven't looked at this.
>> 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.
>
> Correct me if I'm wrong, but do you mean "without ever *specifying* a
> type"?
"Use" was not at all the right word since writing 1+2 obviously "uses"
types, but I don't mean specify either since types can be specified
simply by writing literals like "abc". I should have said something
more technical like "without writing any type signatures".
> Several recent languages have taken this up, including Kotlin
> and Rust, though you have to specify some types.
Yes, and even C++.
> Even Ada 2022 offers it with the "renames" keyword.
I don't know much about Ada newer than about 1990. I'll take a look...
--
Ben.
next prev parent reply other threads:[~2022-06-03 0:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 3:21 who needs types? Types makes code ugly Nasser M. Abbasi
2022-06-02 8:00 ` Doctor Who
2022-06-02 8:37 ` Dmitry A. Kazakov
2022-06-02 10:08 ` Nasser M. Abbasi
2022-06-02 10:39 ` Dmitry A. Kazakov
2022-06-02 13:22 ` Stéphane Rivière
2022-06-06 23:26 ` Jerry
2022-06-02 10:47 ` Jeffrey R.Carter
2022-06-02 11:47 ` ldries46
2022-06-02 15:02 ` Ben
2022-06-02 22:10 ` John Perry
2022-06-03 0:02 ` Ben [this message]
2022-06-03 3:37 ` Dennis Lee Bieber
2022-06-03 18:13 ` Ben
2022-06-03 18:34 ` Niklas Holsti
2022-06-03 20:27 ` John Perry
2022-06-03 20:56 ` Ben
2022-06-04 0:28 ` Randy Brukardt
2022-06-04 12:05 ` What's new in Ada 2022? (was: Re: who needs types? Types makes code ugly.) Dirk Craeynest
2022-06-17 17:33 ` who needs types? Types makes code ugly Wesley Pan
2022-06-17 20:46 ` Paul Rubin
2022-06-18 2:06 ` Randy Brukardt
2022-06-18 10:29 ` Dirk Craeynest
2022-06-18 22:16 ` Paul Rubin
2022-06-20 21:40 ` Randy Brukardt
2022-06-02 17:28 ` Keith Thompson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox