Sujet : Re: New VSI post on Youtube
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.vmsDate : 29. Aug 2024, 02:49:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vaok2s$3m9tm$4@dont-email.me>
References : 1 2
User-Agent : Pan/0.160 (Toresk; )
On Wed, 28 Aug 2024 16:35 +0100 (BST), John Dallman wrote:
In article <valhi8$34s18$4@dont-email.me>, ldo@nz.invalid (Lawrence
D'Oliveiro) wrote:
Perl actually has a vast range of builtins.
True, but they are at least all in one list. The problem I've had with
Python is finding what the word is to do a thing.
I’m not sure I understand that. Python does things by “constructs” rather
than individual “words”. Do you mean function and class names?
Python is actually a fairly small language. Its core language spec is
less than 20% the size of the core Java language spec.
This does not really help your case: Java is another example of an
overblown language.
Why, do you think Java is some kind of outlier?
The file handling library functions are a prime
example. The list rapidly grows larger than the Perl builtins, and is
less well organised.
There is really just the “open” builtin function, and the “io” module for
the basic class definitions, and things like text/binary conversions and
in-memory I/O. And “os” for lower-level OS-specific stuff, and “os.path”
for pathname handling. Temporary files are handled by tempfile, globbing
done by glob and fnmatch, and there’s shutil to provide higher-level
operations like the equivalent of “rm -r”. That’s about it, really. Did I
miss anything?
Note that string formatting/parsing is not part of I/O.
You never had functions and classes as first-class objects in BASIC or
COBOL; you do in Python. You never had metaclasses in those languages;
you do in Python. You never had custom operator overloads in those
languages; you do in Python.
You've missed my point. BASIC and COBOL are languages where you have to
learn specific words to do specific things; Python has that in common
with them.
But you just said above that you can’t seem to find those “words”
(whatever they are) in Python: so clearly by your own admission it doesn’t
work that way at all.
Several younger people at work came to us as determined advocates of
Python. They're written some useful tools in it, but the core of the
development environment remains Perl.
There is a wonderful environment called “Jupyter”, which uses the notebook
paradigm with “cells” that can contain program code or explanatory text.
Program cells can generate various forms of rich output, like graphics,
audio, video, even interactive widgets.
It was originally for Python (the original project was called “IPython”),
but now supports a range of other languages.
I like to use it for “scratchpad” programming: write a few lines to try
something out, then either copy and paste working bits into something more
substantial, or just chuck it away.