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

2017-10-12 Thread bartc
On 12/10/2017 06:39, Grant Edwards wrote: On 2017-10-11, Gregory Ewing wrote: Neil Cerutti wrote: I dig const qualifiers, even though I'm comletely fine with their absence from Python. Out of curiosity, do you have any insights into why you like them in C++, if

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

2017-10-12 Thread bartc
On 12/10/2017 09:23, Christian Gollwitzer wrote: Am 12.10.17 um 01:15 schrieb Stefan Ram:    Define a function »g« with a parameter »x« of type »int«, so    that this function »g« returns a pointer to another function.    This other function has a parameter of type »char« and returns    a

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

2017-10-12 Thread Marko Rauhamaa
Chris Angelico : > On Thu, Oct 12, 2017 at 6:22 PM, Marko Rauhamaa wrote: >> Additionally, you can launder any constant string into a nonconstant >> string with strstr(3): >> >> const char *cs = "hello"; >> char *s = strstr(cs, ""); >> s[0] = 'y';

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

2017-10-12 Thread Thomas Jollans
On 2017-10-12 01:33, Chris Angelico wrote: > Have you seen a city that grew one house at a time, and had > streets added to service those houses? Not good. Actually, that's more or less how most cities grew historically. Nowadays these organically grown city centres tend to be much more

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

2017-10-12 Thread Marko Rauhamaa
Bill : > Marko Rauhamaa wrote: >> One example is the surprising fact that string literals in C are >> "char *" and not "const char *". > > If not, you couldn't pass a string literal to a function having > prototype void f(char *s); That *ought* to be prevented. That's

Re: OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-12 Thread Thomas Jollans
On 2017-10-12 02:51, Chris Angelico wrote: > If it wants new life, it's probably going to need a Linux version, > because that's where a lot of developers hang out. The reality is that > open source developers are much more likely to develop on Linux than > on Windows; you can maintain a Windows

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

2017-10-12 Thread Thomas Jollans
On 2017-10-12 01:32, Christopher Reimer wrote: > On Oct 11, 2017, at 9:07 AM, Bill wrote: >> >> Grant Edwards wrote: >>> On 2017-10-11, Bill wrote: >>> >>> [...] I'm not here to "cast stones", I like Python. I just think that you

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

2017-10-12 Thread Christian Gollwitzer
Am 12.10.17 um 01:15 schrieb Stefan Ram: Define a function »g« with a parameter »x« of type »int«, so that this function »g« returns a pointer to another function. This other function has a parameter of type »char« and returns a double value. Ok /Without/ a typedef. And WHY

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

2017-10-12 Thread Chris Angelico
On Thu, Oct 12, 2017 at 6:22 PM, Marko Rauhamaa wrote: > Grant Edwards : > >> I like [const qualifiers] in C because it allows the linker to place >> them in ROM with the code. It also _sometimes_ provides useful >> diagnostics when you pass a pointer

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

2017-10-12 Thread Bill
Marko Rauhamaa wrote: Grant Edwards : I like [const qualifiers] in C because it allows the linker to place them in ROM with the code. It also _sometimes_ provides useful diagnostics when you pass a pointer to something which shouldn't be modified to something that is

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

2017-10-12 Thread Marko Rauhamaa
Grant Edwards : > I like [const qualifiers] in C because it allows the linker to place > them in ROM with the code. It also _sometimes_ provides useful > diagnostics when you pass a pointer to something which shouldn't be > modified to something that is going to try to

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

2017-10-12 Thread Gregory Ewing
Ben Bacarisse wrote: That's a different type. I think you mean that a human writing C (rather than bartc's code generator) would probably design the code to use tokenrec ** then I agree, but the latter is not just a different way to write the former. Yes, I was translating his English

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

2017-10-12 Thread Gregory Ewing
bartc wrote: The original has an extra pointer so idiomatic C might be more: tokenrec *** I was going by your English description, which when translated into C gives only two pointers. But I think you're right that the C version really has 3 levels of indirection, so the meaning of

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

2017-10-11 Thread Grant Edwards
On 2017-10-12, Steve D'Aprano wrote: > I don't think anyone should expect that platform specific details like the > size of a char should be precisely the same between C and C++. I don't knwo about that. > Even two > different C compilers could return different

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

2017-10-11 Thread Grant Edwards
On 2017-10-11, Gregory Ewing wrote: > Neil Cerutti wrote: >> I dig >> const qualifiers, even though I'm comletely fine with their >> absence from Python. > > Out of curiosity, do you have any insights into why you > like them in C++, if you don't miss them in Python?

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

2017-10-11 Thread Grant Edwards
On 2017-10-11, Chris Angelico wrote: > But since it's the lowest-end sites that have traditionally driven > that demand for PHP, there's a general tendency for low-grade > programmers to gravitate to it, so there's a lot of really REALLY bad > code out there. And there are a

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse wrote: > Chris Angelico writes: > >> On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse wrote: >>> Chris Angelico writes: it binds your URLs to the concrete

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

2017-10-11 Thread ROGER GRAYDON CHRISTMAN
Actually, FORTRAN and COBOL and Algol (for its control structures) Trying to support both of the first two was entertaining -- when you declared a variable, it wasn't enough to say it was an Integer: you had to also declare whether it was represented in Binary or Decimal, and also specify the

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

2017-10-11 Thread Ben Bacarisse
Steve D'Aprano writes: > On Thu, 12 Oct 2017 02:43 am, Marko Rauhamaa wrote: > >> Chris Angelico : >> >>> The places where C++ is not a superset of C are mostly things you >>> wouldn't want to be doing anyway. You can generally take C code and >>>

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

2017-10-11 Thread Steve D'Aprano
On Thu, 12 Oct 2017 02:43 am, Marko Rauhamaa wrote: > Chris Angelico : > >> The places where C++ is not a superset of C are mostly things you >> wouldn't want to be doing anyway. You can generally take C code and >> compile it with a C++ compiler, and it'll have the same

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

2017-10-11 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse wrote: >> Chris Angelico writes: >>> it binds your URLs to >>> the concrete file system. That may not seem like too much of a >>> problem, but it's a pretty big

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse wrote: > Chris Angelico writes: >> it binds your URLs to >> the concrete file system. That may not seem like too much of a >> problem, but it's a pretty big limitation; you can't have URLs like >>

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

2017-10-11 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 9:44 AM, Ben Bacarisse wrote: >> Chris Angelico writes: >>> Check out Django and Flask, the two most popular ways. I quite like >>> Flask. >> >> I see. Both appear to be frameworks (I'd

Re: OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 11:38 AM, boB Stepp wrote: > On Wed, Oct 11, 2017 at 4:45 PM, Mikhail V wrote: > >> >> PS Off-topic: >> I have a related observation regarding popularity of software. >> There is such a program "VLC", which is a video player.

OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-11 Thread boB Stepp
On Wed, Oct 11, 2017 at 4:45 PM, Mikhail V wrote: > > PS Off-topic: > I have a related observation regarding popularity of software. > There is such a program "VLC", which is a video player. Some would > think it is sort of best free player, etc. I was also under

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

2017-10-11 Thread Ben Bacarisse
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Ben Bacarisse writes: >>That's a different type. I think you mean that a human writing C >>(rather than bartc's code generator) would probably design the code to >>use tokenrec ** then I agree, but the latter is not just a

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 9:44 AM, Ben Bacarisse wrote: > Chris Angelico writes: >> Check out Django and Flask, the two most popular ways. I quite like >> Flask. > > I see. Both appear to be frameworks (I'd heard of Django). Do you know > if they widely

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

2017-10-11 Thread Christopher Reimer
On Oct 11, 2017, at 9:07 AM, Bill wrote: > > Grant Edwards wrote: >> On 2017-10-11, Bill wrote: >> >> >>> [...] I'm not here to "cast stones", I like Python. I just think >>> that you shouldn't cast stones at C/C++. >> Not while PHP exists.

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

2017-10-11 Thread Ben Bacarisse
Gregory Ewing writes: > bartc wrote: > >> tokenrec * (*)[] >> >> the original source and that type is written like this: >> >> ref [] ref tokenrec > > The idiomatic way to write that type in C would be > >tokenrec ** That's a different type. I think you

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

2017-10-11 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 7:42 AM, Ben Bacarisse wrote: >> Bill writes: >> >>> Mikhail V wrote: >>> [...] I'm not here to "cast stones", I like Python. I just think >>> that you shouldn't cast

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

2017-10-11 Thread bartc
On 11/10/2017 23:03, Gregory Ewing wrote: bartc wrote:     tokenrec * (*)[] > the original source and that type is written like this:     ref [] ref tokenrec The idiomatic way to write that type in C would be    tokenrec ** The original has an extra pointer so idiomatic C might be

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

2017-10-11 Thread Gregory Ewing
Neil Cerutti wrote: I dig const qualifiers, even though I'm comletely fine with their absence from Python. Out of curiosity, do you have any insights into why you like them in C++, if you don't miss them in Python? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

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

2017-10-11 Thread Gregory Ewing
bartc wrote: tokenrec * (*)[] > the original source and that type is written like this: ref [] ref tokenrec The idiomatic way to write that type in C would be tokenrec ** -- Greg -- https://mail.python.org/mailman/listinfo/python-list

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

2017-10-11 Thread Gregory Ewing
bartc wrote: While on the subject of C syntax, here are some fun ambiguities: f(x);// call function with arg x, or declare x of type f? a*b; // multiply a by b, or declare b of type pointer to a? (a)*b// multiply a by b, or cast *b to type a? Technically these are not ambiguous

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

2017-10-11 Thread bartc
On 11/10/2017 21:52, breamore...@gmail.com wrote: >> 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. Thanks, I guess. You can of course cement your place when you explain how, in your

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

2017-10-11 Thread breamoreboy
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 > >>>

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 7:42 AM, Ben Bacarisse wrote: > Bill writes: > >> Mikhail V wrote: >> [...] I'm not here to "cast stones", I like Python. I just think >> that you shouldn't cast stones at C/C++. > Not while PHP exists. There

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

2017-10-11 Thread Ben Bacarisse
Bill writes: > Mikhail V wrote: > [...] I'm not here to "cast stones", I like Python. I just think > that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... >>> PHP seems (seemed?) popular for laying

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 7:07 AM, Bill wrote: > Mikhail V wrote: > > [...] I'm not here to "cast stones", I like Python. I just think > that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world...

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

2017-10-11 Thread Grant Edwards
On 2017-10-11, Bill wrote: > Mikhail V wrote: > [...] I'm not here to "cast stones", I like Python. I just think > that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... >>> PHP seems (seemed?) popular

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

2017-10-11 Thread Bill
Grant Edwards wrote: On 2017-10-11, Bill wrote: Grant Edwards wrote: On 2017-10-11, Bill wrote: [...] I'm not here to "cast stones", I like Python. I just think that you shouldn't cast stones at C/C++. Not while PHP exists. There

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

2017-10-11 Thread Bill
Mikhail V wrote: [...] I'm not here to "cast stones", I like Python. I just think that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... PHP seems (seemed?) popular for laying out web pages. Are their vastly superior options? Python?

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

2017-10-11 Thread bartc
On 11/10/2017 20:30, Chris Angelico wrote: On Thu, Oct 12, 2017 at 3:29 AM, Rhodri James wrote: On 11/10/17 15:36, Chris Angelico wrote: That's only really one level more complex than declarations I use fairly regularly (I am an embedded system programmer most of the

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

2017-10-11 Thread bartc
On 11/10/2017 19:30, Chris Angelico wrote: On Thu, Oct 12, 2017 at 5:22 AM, Grant Edwards The easiest way to make stuff like that readable is to unroll them into a sequence of typedefs. But, a lot of people never really learn how to do that... The most complexity you'll usually see is a

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 3:29 AM, Rhodri James wrote: > On 11/10/17 15:36, Chris Angelico wrote: >> >> On Thu, Oct 12, 2017 at 1:14 AM, bartc wrote: >>> >>> Python, maybe. C syntax isn't as painful as C++ but I still have a lot of >>> trouble with it. (Eg.

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

2017-10-11 Thread bartc
On 11/10/2017 17:16, Jonathan Cast wrote: On Wed, 2017-10-11 at 15:14 +0100, 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

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

2017-10-11 Thread Rhodri James
On 11/10/17 15:36, Chris Angelico wrote: On Thu, Oct 12, 2017 at 1:14 AM, bartc wrote: 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

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 5:35 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Thu, Oct 12, 2017 at 2:43 AM, Marko Rauhamaa wrote: >>> That is not immediately all that significant but points to subtle >>> incompatibilities between the data

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

2017-10-11 Thread Marko Rauhamaa
Chris Angelico : > On Thu, Oct 12, 2017 at 2:43 AM, Marko Rauhamaa wrote: >> That is not immediately all that significant but points to subtle >> incompatibilities between the data models of C and C++. > > Indeed - their handling of empty structs is different.

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 5:22 AM, Grant Edwards wrote: > On 2017-10-11, bartc wrote: >> On 11/10/2017 15:36, Chris Angelico wrote: >>> On Thu, Oct 12, 2017 at 1:14 AM, bartc wrote: Python, maybe. C syntax isn't as painful as C++

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

2017-10-11 Thread Grant Edwards
On 2017-10-11, Bill wrote: > Grant Edwards wrote: >> On 2017-10-11, Bill wrote: >> >> >>> [...] I'm not here to "cast stones", I like Python. I just think >>> that you shouldn't cast stones at C/C++. >> Not while PHP exists. There aren't

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

2017-10-11 Thread Jonathan Cast
On Wed, 2017-10-11 at 15:14 +0100, 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

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

2017-10-11 Thread breamoreboy
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

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

2017-10-11 Thread Grant Edwards
On 2017-10-11, bartc wrote: > On 11/10/2017 15:36, Chris Angelico wrote: >> On Thu, Oct 12, 2017 at 1:14 AM, bartc wrote: >>> Python, maybe. C syntax isn't as painful as C++ but I still have a lot of >>> trouble with it. (Eg. the variable declaration

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 2:43 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> The places where C++ is not a superset of C are mostly things you >> wouldn't want to be doing anyway. You can generally take C code and >> compile it with a C++ compiler, and it'll

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

2017-10-11 Thread Bill
Grant Edwards wrote: On 2017-10-11, Bill wrote: [...] I'm not here to "cast stones", I like Python. I just think that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... PHP seems (seemed?) popular for laying out

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

2017-10-11 Thread bartc
On 11/10/2017 15:36, Chris Angelico wrote: On Thu, Oct 12, 2017 at 1:14 AM, bartc wrote: 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

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

2017-10-11 Thread bartc
On 11/10/2017 15:52, breamore...@gmail.com 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.

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

2017-10-11 Thread Neil Cerutti
On 2017-10-11, Marko Rauhamaa wrote: > Bill : >> Steve D'Aprano wrote: >>> Bjarne Stroustrup is famous for designing one of the most >>> heavyweight, baraque, hard-to-understand, difficult-to-use >>> programming languages in common use. While C++ has

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

2017-10-11 Thread Marko Rauhamaa
Chris Angelico : > The places where C++ is not a superset of C are mostly things you > wouldn't want to be doing anyway. You can generally take C code and > compile it with a C++ compiler, and it'll have the same semantics. Here's a C/C++ program:

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 1:14 AM, bartc wrote: > 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 >

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

2017-10-11 Thread bartc
On 11/10/2017 14:16, Marko Rauhamaa wrote: C++'s main problem is that it tries to solve the wrong problem. A C++ compiler seeks to make sure your program doesn't have bugs. That noble (but futile) goal makes it painful to program in C++. It's painful to program for lots of reasons, I don't

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

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 12:16 AM, Marko Rauhamaa wrote: > Rhodri James : > >> C++ is designed, true, but well designed? It has a fundamental flaw; >> it wants to be both a high-level language and compatible with C, under >> the mistaken impression that C is

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

2017-10-11 Thread Grant Edwards
On 2017-10-11, Bill wrote: > [...] I'm not here to "cast stones", I like Python. I just think > that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... -- Grant Edwards grant.b.edwardsYow! Is

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

2017-10-11 Thread Marko Rauhamaa
Rhodri James : > C++ is designed, true, but well designed? It has a fundamental flaw; > it wants to be both a high-level language and compatible with C, under > the mistaken impression that C is a high level language. Since C is > actually an excellent macro-assembler, this

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

2017-10-11 Thread Rhodri James
On 11/10/17 01:48, Bill wrote: Steve D'Aprano wrote: On Tue, 10 Oct 2017 06:06 am, Stefan Ram wrote: In his book about programming, Bjarne Stroustrup writes: |We try hard to avoid "white lies"; that is, we refrain from |oversimplified explanations that are clear and easy to |understand, but

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

2017-10-11 Thread Thomas Jollans
On 2017-10-10 13:09, Bill wrote: > (at least based upon "The C++ Programming Language", 3rd ed.) My impression when I read "The C++ Programming Language" as a teenager (many years ago) was that the 1st edition was an excellent, if somewhat dense book, while the 3rd edition was completely

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

2017-10-11 Thread Marko Rauhamaa
Bill : > Steve D'Aprano wrote: >> Bjarne Stroustrup is famous for designing one of the most >> heavyweight, baraque, hard-to-understand, difficult-to-use >> programming languages in common use. While C++ has many excellent >> features, and is constrained by the need to

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

2017-10-10 Thread Bill
Dennis Lee Bieber wrote: On Tue, 10 Oct 2017 20:48:26 -0400, Bill declaimed the following: cast stones at C/C++. People started programming in C in the late 70's, and before that some were programming in B ("B Programming Language"), Preceded by BCPL (which

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

2017-10-10 Thread Bill
Steve D'Aprano wrote: On Tue, 10 Oct 2017 06:06 am, Stefan Ram wrote: In his book about programming, Bjarne Stroustrup writes: |We try hard to avoid "white lies"; that is, we refrain from |oversimplified explanations that are clear and easy to |understand, but not true in the context of real

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

2017-10-10 Thread Bill
Rhodri James wrote: On 09/10/17 20:06, Stefan Ram wrote: r...@zedat.fu-berlin.de (Stefan Ram) writes: Steve D'Aprano writes: At various stages of education, we teach many lies-to-children, including: Many of those lies can be perfectly true in some sense. I pick

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

2017-10-10 Thread Rhodri James
On 09/10/17 20:06, Stefan Ram wrote: r...@zedat.fu-berlin.de (Stefan Ram) writes: Steve D'Aprano writes: At various stages of education, we teach many lies-to-children, including: Many of those lies can be perfectly true in some sense. I pick some examples:

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

2017-10-10 Thread Steve D'Aprano
On Tue, 10 Oct 2017 06:06 am, Stefan Ram wrote: > In his book about programming, Bjarne Stroustrup writes: > > |We try hard to avoid "white lies"; that is, we refrain from > |oversimplified explanations that are clear and easy to > |understand, but not true in the context of real languages and >

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

2017-10-07 Thread Richard Damon
On 10/4/17 11:22 PM, Steve D'Aprano wrote: The A and E in the word "are" are not vowels, since they are silent. The A is clearly not silent, unless you have some strange pronunciation. The fact that are is pronounced just like the NAME of the letter R doesn't mean it is silent. Compare the

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

2017-10-07 Thread Pavol Lisy
On 10/5/17, Steve D'Aprano wrote: > The A and E in the word "are" are not vowels, since they are silent. Interesting! :) Is then R (half?) silent in word "Brazil"? -- https://mail.python.org/mailman/listinfo/python-list

Re: OT I before E [was Re: Lies in education [was Re: The "loop and a half"]]

2017-10-06 Thread CFK
On Oct 5, 2017 2:02 PM, "Roel Schroeven" wrote: Thomas Jollans schreef op 5/10/2017 10:30: On 2017-10-05 06:47, Steve D'Aprano wrote: > >> On Thu, 5 Oct 2017 02:54 pm, Chris Angelico wrote: >> >>> (There are exceptions even to the longer form of the rule, but only a >>>

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

2017-10-05 Thread Gregory Ewing
Steve D'Aprano wrote: I've seen (or at least, I remember seeing) diagrams of matter/antimatter annihilation with the two particles coming together and a single photon coming out: a simplified and strictly wrong view of the physics. It may or may not be wrong, depending on what the diagram was

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

2017-10-05 Thread Bill
Marko Rauhamaa wrote: That's good advice, but it's not all that dangerous to express off-topic statements in this newsgroup. It may not be "dangerous", but I find it a little annoying. I wasn't going to say anything, but now you are bringing it up explicitly. --

Re: OT I before E [was Re: Lies in education [was Re: The "loop and a half"]]

2017-10-05 Thread Roel Schroeven
Thomas Jollans schreef op 5/10/2017 10:30: On 2017-10-05 06:47, Steve D'Aprano wrote: On Thu, 5 Oct 2017 02:54 pm, Chris Angelico wrote: (There are exceptions even to the longer form of the rule, but only a handful. English isn't a tidy language.) Even with the longer version of the rule,

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

2017-10-05 Thread Marko Rauhamaa
r...@zedat.fu-berlin.de (Stefan Ram): > Some of you are experts in Python, but are only > half-educated when it comes to physics, C++ or other topics. > I wish those persons would not broadcast their > half-knowledge in the form of confident statements, I don't wish that. That would only

Re: OT I before E [was Re: Lies in education [was Re: The "loop and a half"]]

2017-10-05 Thread Thomas Jollans
On 2017-10-05 06:47, Steve D'Aprano wrote: > On Thu, 5 Oct 2017 02:54 pm, Chris Angelico wrote: >> (There are exceptions even to the longer form of the rule, but only a >> handful. English isn't a tidy language.) > > Even with the longer version of the rule, there are so few applicable cases, >

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

2017-10-05 Thread Thomas Jollans
On 2017-10-05 06:24, Steve D'Aprano wrote: > On Thu, 5 Oct 2017 02:14 pm, Stefan Ram wrote: > >> Chris Angelico writes: >>> You can get through a lot of life believing that mass is conserved, >>> but technically it is not, as can be proven. >> >> Well, in fact, it is

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

2017-10-05 Thread Steve D'Aprano
On Thu, 5 Oct 2017 03:54 pm, Stefan Ram wrote: > Steve D'Aprano writes: >>In actual annihilation events, there is (as far as I know) >>generally a single real photon produced > > »There are only a very limited set of possibilities for > the final state.

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

2017-10-05 Thread breamoreboy
On Thursday, October 5, 2017 at 4:22:26 AM UTC+1, Steve D'Aprano wrote: > On Thu, 5 Oct 2017 01:21 pm, Stefan Ram wrote: > > >>- Germany was the aggressor in World War 2; > >>- well, Germany and Japan; > >>- *surely* it must be Germany, Italy and Japan; > > > > This listing style reminds me of

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

2017-10-05 Thread Tim Delaney
On 5 October 2017 at 14:22, Steve D'Aprano wrote: > The A and E in the word "are" are not vowels, since they are silent. The U > in "unicorn" and "university" are not vowels either, and if you write "an > unicorn" you are making a mistake. > There are dialects of

OT I before E [was Re: Lies in education [was Re: The "loop and a half"]]

2017-10-04 Thread Steve D'Aprano
On Thu, 5 Oct 2017 02:54 pm, Chris Angelico wrote: > On Thu, Oct 5, 2017 at 2:22 PM, Steve D'Aprano > wrote: >> It is, I think, an example of a stupid English language folklore that >> people repeat unthinkingly, even though the counter-examples are obvious >> and

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

2017-10-04 Thread Steve D'Aprano
On Thu, 5 Oct 2017 02:14 pm, Stefan Ram wrote: > Chris Angelico writes: >>You can get through a lot of life believing that mass is conserved, >>but technically it is not, as can be proven. > > Well, in fact, it is conserved. It certainly is not. The whole point of

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

2017-10-04 Thread Steve D'Aprano
On Thu, 5 Oct 2017 02:54 pm, Chris Angelico wrote: > On Thu, Oct 5, 2017 at 2:22 PM, Steve D'Aprano > wrote: [...] >> In the East, while Japan did take the first overtly military action against >> the US, the US had (in some sense) first engaged in hostile behaviour

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

2017-10-04 Thread Chris Angelico
On Thu, Oct 5, 2017 at 2:22 PM, Steve D'Aprano wrote: > It is, I think, an example of a stupid English language folklore that people > repeat unthinkingly, even though the counter-examples are obvious and common. > Like "I before E except after C", which is utter

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

2017-10-04 Thread Steve D'Aprano
On Thu, 5 Oct 2017 01:21 pm, Stefan Ram wrote: > Steve D'Aprano writes: >>At various stages of education, we teach many lies-to-children, including: > > Many of those lies can be perfectly true in some sense. Well of course, that's the whole point of them being

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

2017-10-04 Thread Chris Angelico
On Thu, Oct 5, 2017 at 1:21 PM, Stefan Ram wrote: > Steve D'Aprano writes: >>At various stages of education, we teach many lies-to-children, including: > > Many of those lies can be perfectly true in some sense. > I pick some examples: >

<    1   2