POV-Ray : Newsgroups : povray.off-topic : HWN : Re: HWN Server Time
4 Sep 2024 17:24:50 EDT (-0400)
  Re: HWN  
From: Orchid XP v8
Date: 5 Dec 2009 15:25:15
Message: <4b1ac1ab@news.povray.org>
>> "I was TA for a C++ programming course aimed at 1st year physics once. 
>> Some girl asked for help. 'I wrote pseudo-code but I cannot translate it 
>> to C++'. Her pseudo-code was valid Haskell. I cried."
> 
>   I would be really surprised if that was a real story.

Yeah, I would imagine it's more like "it was _almost_ valid Haskell".

Unless this girl happened to be an actual Haskell programmer in the 
first place, of course... Otherwise it's unlikely it would be exactly 
runnable. But I guess it might be close if you're used to the 
mathematician's way to explaining things.

>> "If you read a haskell book or an FP book, by chapter 5 it's already 
>> doing data structures. It's chapter 10 in imperative books."
> 
>   It depends on the book, really.

Well, this is true. Of course it's a blanket generalisation.

>   If I were to write a book on C++, I would start with object-oriented
> programming concepts and the first C++ keyword which would appear in the
> entire book would be "class".
> 
>   (I really think that books which start with "main()" or a "hello world"
> program are starting from the wrong end of the spectrum.)

I guess having Hello World means you've got something you can actually 
compile and run, and thereby check that your C++ compiler is set up 
right and you know how to work it... But yes, for learning the language, 
it's probably not the best place to start. But if you want a *runnable* 
C++ program, you need to know about main() and so forth.

(Haskell has the advantage here that you can run code snippets in an 
interpretter before you've learned how to make a "runnable program". 
Haskell books usually have Hello World near the back. Then again, maybe 
somebody somewhere has a C++ interpretter, or at least some C++ 
boilerplate for running small example fragments?)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.