[J3] ballot #38
Holcomb, Katherine A (kah3f)
kah3f at virginia.edu
Wed Feb 2 19:25:57 UTC 2022
Python is certainly strongly typed, but it’s also dynamically typed and it uses duck typing.
From: J3 <j3-bounces at mailman.j3-fortran.org> On Behalf Of William Clodius via J3
Sent: Tuesday, February 1, 2022 4:46 PM
To: General J3 interest list <j3 at mailman.j3-fortran.org>
Cc: William Clodius <w.clodius at icloud.com>
Subject: Re: [J3] ballot #38
Fortran is a strongly and statically typed language with optional implicit typing. In contrast to Malcolm, I would say that duck typing is a form of dynamic, but strong, typing. Dynamic because the type of a variable can change on the fly, but strong because there are significant limitations on what can be done with a variable given it’s current type. A weakly typed language typically has only one or two types, e.g. many scripting languages rely almost exclusively on strings. Another form of weak typing is a language that treats each variable as an address whose contents are to be interpreted depending on context. I believe that BCPL was weakly typed in the second sense.
On Feb 1, 2022, at 11:16 AM, Gary Klimowicz via J3 <j3 at mailman.j3-fortran.org<mailto:j3 at mailman.j3-fortran.org>> wrote:
On Jan 31, 2022, at 22:04, Malcolm Cohen via J3 <j3 at mailman.j3-fortran.org<mailto:j3 at mailman.j3-fortran.org>> wrote:
> From my experience with other languages with duck typing,
Duck typing is a dynamic typing system that has nothing whatsoever to do with Fortran sequence types. Nothing. It is used in languages that don’t have strong typing; Fortran is a strongly typed language.
Fortran sequence types do not even use structural typing (which is the closest static equivalent to “duck typing”.
Thank you, Malcolm. I stand corrected.
Is there a well-known name that corresponds to the Fortran type model? (I'm about to do a literature search for a class I'm taking.)
Best regards,
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20220202/fa13c6fd/attachment.htm>
More information about the J3
mailing list