Lies in education [was Re: The "loop and a half"]

breamoreboy at gmail.com breamoreboy at gmail.com
Wed Oct 11 16:52:16 EDT 2017


On Wednesday, October 11, 2017 at 4:47:43 PM UTC+1, bartc wrote:
> On 11/10/2017 15:52, wrote:
> > On Wednesday, October 11, 2017 at 3:14:51 PM UTC+1, bartc wrote:
> >> On 11/10/2017 14:16, Marko Rauhamaa wrote:
> >>
> >>> Python and C don't try to protect you. In return, you get syntactic
> >>> convenience that probably enhances the quality of your programs.
> >>
> >> Python, maybe. C syntax isn't as painful as C++ but I still have a lot
> >> of trouble with it. (Eg. the variable declaration 'char(*(*x[3])())[5]'.
> >> The name of the variable can be found lurking in that lot somewhere, but
> >> what's the type?) Not so convenient.
> 
> > https://cdecl.org/ tells me that your variable declaration is a syntax error so maybe not much of an example.
> 
> Perhaps you didn't write or paste it properly. The site tells me that:
> 
>     char(*(*x[3])())[5]
> 
> (with or without a trailing semicolon) means:
> 
>     declare x as array 3 of pointer to function returning pointer to
>     array 5 of char
> 
> (Example taken from page 122 of the C book "K&R2", in a section about 
> writing a program to make sense of complex declarations.)
> 
> Anyway that fact you either tripped up on typing it, or that you had to 
> use a special tool to find out what it meant, sort of reinforces my point...
> 
> -- 
> bartc

Don't know what happened there but what the heck.  More importantly is the fact that due to your magnificent performance recently you have been promoted to be the General Manager of my Dream Team.  You can of course cement your place when you explain how, in your language, converting an invalid piece of user input, which should be an integer, is always converted to zero, and how you handle the inevitable divide by zero errors that will always, eventually, occur.

--
Kindest regards.

Mark Lawrence.



More information about the Python-list mailing list