Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Nobody
On Sun, 16 Aug 2009 05:05:01 +, Steven D'Aprano wrote: > Now that I understand what the semantics of cout << "Hello world" are, I > don't have any problem with it either. It is a bit weird, "Hello world" > >> cout would probably be better, Placing the stream on the LHS allows the main forms

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Douglas Alan
On Aug 16, 6:18 am, Steven D'Aprano wrote: > On Sun, 16 Aug 2009 01:41:41 -0700, Douglas Alan wrote: > > I would definitely not like a language that obscures assignment by > > moving it over to the right side of lines. > One could argue that left-assigned-from-right assignment obscures the > mo

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Douglas Alan
On Aug 16, 8:45 am, MRAB wrote: > No, APL is strictly right-to-left. > >      -> x > > means "goto x". > > Writing to the console is: > >      [] <- myVar > > Reading from the console is: > >      myVar <- [] Ah, thanks for the correction. It's been 5,000 years since I used APL! |>ouglas -- ht

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread MRAB
Douglas Alan wrote: [snip] C++ also allows for reading from stdin like so: cin >> myVar; I think the direction of the arrows probably derives from languages like APL, which had notation something like so: myVar <- 3 [] <- myVar "<-" was really a little arrow symbol (APL didn't us

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Hendrik van Rooyen
On Sunday 16 August 2009 12:18:11 Steven D'Aprano wrote: > In any case, after half a century of left-from-right assignment, I think > it's worth the experiment in a teaching language or three to try it the > other way. The closest to this I know of is the family of languages > derived from Apple's

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Steven D'Aprano
On Sun, 16 Aug 2009 01:41:41 -0700, Douglas Alan wrote: > I like to be able to read everything from left to right, and Lisp does > that more than any other programming language. > > I would definitely not like a language that obscures assignment by > moving it over to the right side of lines. On

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Douglas Alan
On Aug 16, 4:48 am, Erik Max Francis wrote: > Douglas Alan wrote: > > Personally, my favorite is Lisp, which looks like > > >    (set! y (+ y 1)) > > For varying values of "Lisp."  `set!` is Scheme. Yes, I'm well aware! There are probably as many different dialects of Lisp as all other programmi

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Erik Max Francis
Douglas Alan wrote: Personally, my favorite is Lisp, which looks like (set! y (+ y 1)) For varying values of "Lisp." `set!` is Scheme. -- Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis Get there

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Erik Max Francis
Steven D'Aprano wrote: I don't like normal assignment. After nearly four decades of mathematics and programming, I'm used to it, but I don't think it is especially good. It confuses beginners to programming: they get one set of behaviour drilled into them in maths class, and then in programming

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Douglas Alan
On Aug 16, 4:22 am, Steven D'Aprano wrote: > I don't like normal assignment. After nearly four decades of mathematics > and programming, I'm used to it, but I don't think it is especially good. > It confuses beginners to programming: they get one set of behaviour > drilled into them in maths clas

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Steven D'Aprano
On Sun, 16 Aug 2009 09:24:36 +0200, Hendrik van Rooyen wrote: >>"Steven D'Aprano" wrote: > >>Now that I understand what the semantics of cout << "Hello world" are, I >>don't have any problem with it either. It is a bit weird, "Hello world" cout would probably be better, but it's hardly the

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-16 Thread Hendrik van Rooyen
>"Steven D'Aprano" wrote: >Now that I understand what the semantics of cout << "Hello world" are, I >don't have any problem with it either. It is a bit weird, "Hello world" >>> cout would probably be better, but it's hardly the strangest design in >any programming language, and it's probably

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread Douglas Alan
On Aug 16, 1:05 am, Steven D'Aprano wrote: > On Sat, 15 Aug 2009 20:00:23 -0700, Douglas Alan wrote: > > So, as far as I can tell, Python has no real authority to throw stones > > at C++ on this little tiny particular issue. > I think you're being a tad over-defensive. Defensive? Personally, I p

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread Steven D'Aprano
On Sat, 15 Aug 2009 20:00:23 -0700, Douglas Alan wrote: > So, as far as I can tell, Python has no real authority to throw stones > at C++ on this little tiny particular issue. I think you're being a tad over-defensive. I asked a genuine question about a quote in somebody's signature. That's a qu

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread Douglas Alan
On Aug 15, 10:19 pm, Steven D'Aprano wrote: > On Sat, 15 Aug 2009 13:01:43 -0700, Douglas Alan wrote: > > P.S. I find it strange, however, that anyone who is not okay with > > "abusing" operator overloading in this manner, wouldn't also take > > umbrage at Python's overloading of "+" to work with

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread Steven D'Aprano
On Sat, 15 Aug 2009 13:01:43 -0700, Douglas Alan wrote: > P.S. I find it strange, however, that anyone who is not okay with > "abusing" operator overloading in this manner, wouldn't also take > umbrage at Python's overloading of "+" to work with strings and lists, > etc. Numerical addition and seq

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread John Haggerty
I guess the problem is---does it actually matter? On Fri, Aug 14, 2009 at 10:11 AM, Steven D'Aprano < st...@remove-this-cybersource.com.au> wrote: > On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: > > > "I saw `cout' being shifted "Hello world" times to the left and stopped > > right there." --S

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread Douglas Alan
On Aug 14, 10:25 pm, Dave Angel wrote: > Benjamin Kaplan wrote: > > On Fri, Aug 14, 2009 at 12:42 PM, Douglas Alan wrote: > >> P.S. Overloading "left shift" to mean "output" does indeed seem a bit > >> sketchy, but in 15 years of C++ programming, I've never seen it cause > >> any confusion or b

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread Chris Rebert
On Sat, Aug 15, 2009 at 4:47 AM, Hendrik van Rooyen wrote: > On Friday 14 August 2009 18:11:52 Steven D'Aprano wrote: >> On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: >> > "I saw `cout' being shifted "Hello world" times to the left and stopped >> > right there."  --Steve Gonedes >> >> Assuming th

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread Hendrik van Rooyen
On Friday 14 August 2009 18:11:52 Steven D'Aprano wrote: > On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: > > "I saw `cout' being shifted "Hello world" times to the left and stopped > > right there." --Steve Gonedes > > Assuming that's something real, and not invented for humour, I presume > that

Re: Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Dave Angel
Benjamin Kaplan wrote: On Fri, Aug 14, 2009 at 12:42 PM, Douglas Alan wrote: P.S. Overloading "left shift" to mean "output" does indeed seem a bit sketchy, but in 15 years of C++ programming, I've never seen it cause any confusion or bugs. The only reason it hasn't is because people

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Benjamin Kaplan
On Fri, Aug 14, 2009 at 12:42 PM, Douglas Alan wrote: > > P.S. Overloading "left shift" to mean "output" does indeed seem a bit > sketchy, but in 15 years of C++ programming, I've never seen it cause > any confusion or bugs. The only reason it hasn't is because people use it in "Hello World". I

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Erik Max Francis
Grant Edwards wrote: On 2009-08-14, Erik Max Francis wrote: Grant Edwards wrote: On 2009-08-14, Steven D'Aprano wrote: What the hell would it actually do??? IIRC in C++, cout << "Hello world"; is equivalent to this in C: printf("Hellow world"); or this in Python: print "hello

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Grant Edwards
On 2009-08-14, Erik Max Francis wrote: > Grant Edwards wrote: >> On 2009-08-14, Steven D'Aprano wrote: >>> What the hell >>> would it actually do??? >> >> IIRC in C++, >> >>cout << "Hello world"; >> >> is equivalent to this in C: >> >>printf("Hellow world"); >> >> or this in Python:

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Erik Max Francis
Grant Edwards wrote: On 2009-08-14, Steven D'Aprano wrote: What the hell would it actually do??? IIRC in C++, cout << "Hello world"; is equivalent to this in C: printf("Hellow world"); or this in Python: print "hellow world" Well, plus or minus newlines. -- Erik Max Francis

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Douglas Alan
On Aug 14, 12:17 pm, Grant Edwards wrote: > On 2009-08-14, Steven D'Aprano wrote: > > On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: > >> "I saw `cout' being shifted "Hello world" times to the left and stopped > >> right there."  --Steve Gonedes > > > Assuming that's something real, and not i

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread MRAB
Grant Edwards wrote: On 2009-08-14, Steven D'Aprano wrote: On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: "I saw `cout' being shifted "Hello world" times to the left and stopped right there." --Steve Gonedes Assuming that's something real, and not invented for humour, I presume that's desc

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Grant Edwards
On 2009-08-14, Steven D'Aprano wrote: > On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: > >> "I saw `cout' being shifted "Hello world" times to the left and stopped >> right there." --Steve Gonedes > > Assuming that's something real, and not invented for humour, I presume > that's describing som

OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: > "I saw `cout' being shifted "Hello world" times to the left and stopped > right there." --Steve Gonedes Assuming that's something real, and not invented for humour, I presume that's describing something possible in C++. Am I correct? What the he