syntax difference

Bart bart at 1
Sun Jun 24 00:26:42 EDT 2018


  To: boB Stepp
From: Bart <bc at freeuk.com>

On 23/06/2018 20:52, boB Stepp wrote:
> I've finally found time to examine this rather long, rambling thread.

>> There is a place for various levels of programming language. I'm saying that
Python which is always touted as a 'simple' language suitable for beginners, is
 missing a surprising number of basics.

> I still feel like a rank beginner, but on the Tutor list some
> disagree.

The first programming exercise I ever did involved asking for three numbers,
then determining whether those numbers could form the sides of a triangle.

Then [40 years ago], the easy part was reading the three numbers. Now that
would be the more challenging part.

This is one of the basics that is missing. Getting around it is not hard, but
it's some messing about and it's a distraction. But 40 years ago it was just
'readln a,b,c'; it was just taken for granted.

(It make seem quaint in these days of GUIs, gestures, and voice recognition to
be reading a line at a time, but you will need it still for text file i/o.)

> Anyway, so far Python has not lacked for anything I have needed so
> far.

I'd be surprised if Python lacked anything; there can't be anything that
someone has thought of that is either built-in or bolted on, if not always that
 elegantly or that efficiently.

However, imagine having to use a language which didn't have assignments as you
are used to, and that you would expect to exist. Then you might well remark
that it's missing something that you regard as a basic, while the proponents of
 that language point out that it doesn't stop you writing programs; it just
needs a different approach.

(I believe that you can write any program using just IF-GOTO statements and
ASSIGNMENT statements, and no other flow control (given suitable data-types and
 means of I/O). But if you wanted to try out an interesting experiment along
those lines (eg. transcribe any flowchart to code), a large number of
languages, including Python, make it hard because 'goto' is missing.)

> All I can say is I have yet to find much at all in Python cumbersome
> or bewildering.

No? How many ways are there in Python, including third party add-ons, of
working with record-like objects?

> As an aside to Bart, if you strongly feel that Python is missing a
> really useful feature, then why don't you do the usual thing, start a
> very specific thread about just that feature (Not just a collection of
> things you like in one of your languages.), and if you manage to
> persuade the community of its usefulness, then write up a PEP about
> it?  Just saying ... ~(:>))

I'm not a user. My interest is in design and implementation, especially of
interpreters, and especially of efficient ones. A lot of things that Python
could do with are made very difficult by the existing design of that language.
Being so dynamic has a lot to answer for.

So I don't envy the job of the people who really have to move the language
forward. That doesn't mean I can't argue with people who say that Python
doesn't really need (say) Switch. (I guess the Blub paradox works both ways...)

--
bart

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)



More information about the Python-list mailing list