Weak Type Ability for Python
Chris Angelico
rosuav at gmail.com
Thu Apr 13 15:35:22 EDT 2023
On Fri, 14 Apr 2023 at 03:29, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>
> On Thu, 13 Apr 2023 12:21:58 +1000, Cameron Simpson <cs at cskk.id.au>
> declaimed the following:
>
> >On 12Apr2023 22:12, avi.e.gross at gmail.com <avi.e.gross at gmail.com> wrote:
> >>I suspect the OP is thinking of languages like PERL or JAVA which guess
> >>for
> >>you and make such conversions when it seems to make sense.
> >
> >JavaScript guesses. What a nightmare. Java acts like Python and will
> >forbid it on type grounds (at compile time with Java, being staticly
> >typed).
> >
>
> REXX -- where everything is considered a string until it needs to be
> something else.
>
> REXX-ooRexx_5.0.0(MT)_64-bit 6.05 23 Dec 2022
> rexxtry.rex lets you interactively try REXX statements.
> Each string is executed when you hit Enter.
> Enter 'call tell' for a description of the features.
> Go on - try a few... Enter 'exit' to end.
> x = 1;
> ........................................... rexxtry.rex on WindowsNT
> y = "a";
> ........................................... rexxtry.rex on WindowsNT
> say x||y;
> 1a
> ........................................... rexxtry.rex on WindowsNT
REXX - where everything is a string, arithmetic can be done on
strings, and data structures are done in the variable name instead of
the value.
I've seen quite a few strings-only languages, but I can't think of any
other language than REXX where you create arrays and dictionaries by
using computed variable names.
It was quite the experience back in the day (as OS/2's native
scripting language), and one that I'm truly glad to have had, as it
taught me so much about the differences between languages.
(It also taught me to treasure good documentation and value it as
truly precious, because SysSetObjectData was an incredibly powerful
function whose docs just referred to WinSetObjectData, and the window
manager's docs weren't part of what I had available.)
ChrisA
More information about the Python-list
mailing list