Guido sees the light: PEP 8 updated

Terry Reedy tjreedy at udel.edu
Tue Apr 19 23:23:32 EDT 2016


On 4/19/2016 9:38 PM, Steven D'Aprano wrote:

> So-called "visual programming environments" (think: Visual Basic) are
> well-suited to laying out the interface of GUI applications. They might
> even be useful for extremely limited mini-languages like regexes. I'm told
> that there are still people who think that UML diagrams are a good idea.
> They're probably good for dataflow programming. But ultimately, to be
> productive with one, you still need text.
>
> As for "visual programming languages" (languages with an inherent visual
> form which lacks any simple or obvious text equivalent), they've been a
> dead-end. Even languages like Scratch cannot do without text. Look at
> the "Hello World" program here:
>
> https://en.wikipedia.org/wiki/File:Scratch_Hello_World.png
>
> The graphical elements are pure presentation, to make it more palatable to
> children and beginners.

I think it is at least as important that the output is pictorial or even 
aural, then having the input text (and you are right, it is text) 
colored.  By comparison, factorial functions (and most calculation 
examples) are rather boring.

> Don't think that I'm opposed to such visual presentations. Look at the
> sample code shown at the top of the page here:
>
> https://scratch.mit.edu/
>
> It kinda looks like Hypertalk syntax, which some of you may remember I'm
> exceedingly fond of. There's no reason why a GUI editor couldn't display
> Python code using such "building block" structure. E.g. indented blocks
> could use colour and shape cues to reinforce the structure of the code,
> just as Scratch does.

That is an interesting idea.  Perhaps I have been stuck in either/or 
thinking -- either graphical or textual. With tk Text (IDLE), it would 
be possible to tag each (4-space) indent with a color for the compound 
statememt keywork causing the indent.

> And if you want to see another reason why text rocks as the core for
> programming languages?
>
>
> "Oh no! We're having trouble displaying this Scratch project.
>
> If you are on a mobile phone or tablet, try visiting this project on a
> computer.
>
> If you're on a computer, your Flash player might be disabled, missing, or
> out of date."

I had to enable Flash for this site.  What are they going to do when 
Flash is dead rather than just dying?  (Get with html5, perhaps?)

> Yeah, thanks guys. Really helpful.

-- 
Terry Jan Reedy




More information about the Python-list mailing list