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
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
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
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
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
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
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
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
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
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
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
>"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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
29 matches
Mail list logo