On Wed, Jan 10, 2018 at 12:34 PM, Richard Schoen
<Richard.Schoen@xxxxxxxxxxxxxxx> wrote:
I find the Python scripting to be a bit cleaner than PHP so far.
I've been going on about Python for ages and you're just now playing
around with it? I guess I feel both dismissed and vindicated at the
same time. ;)
Note that I've been using iSeriesPython since V5R2, which is actually
even earlier than PHP became available for IBM midrange. (And I know
of at least one shop which used iSeriesPython in production on
V4-something.)
I still feel like these un-typed languages leave much room for error, but they are greatly embraced in today's world so I guess I can go along sometimes. Moo....
It's definitely incorrect to call Python or PHP "un-typed languages".
They have types.
But they are *dynamically* typed.
Moreover, there is a very significant difference between the behavior
of types in Python versus PHP (and JavaScript). Python is *strongly*
typed, meaning that values of one type are not generally
interchangeable with values of another type. Python will give you an
error if you try to add a number to a string, for example. PHP and
JavaScript will blithely (and silently) coerce values into other types
until the operation can proceed, and then do the operation, with
sometimes <strike>insane</strike>difficult to debug results. Besides
the syntax, this is another aspect of Python that may be contributing
to a "cleaner feeling" than PHP.
John Y.
As an Amazon Associate we earn from qualifying purchases.