View Single Post
  #23   Report Post  
Posted to rec.crafts.metalworking
Tim Wescott Tim Wescott is offline
external usenet poster
 
Posts: 1,620
Default Beginning programming question

On 03/03/2011 08:24 PM, Joseph Gwinn wrote:
In ,
"Ed wrote:

I know, I should ask this somewhere else, but I don't trust somewhere
else...

My son is an economics researcher for a think tank, and he uses statistics
programs -- SAS, SPSS, and SDATA -- all day long. He took it upon himself to
learn scripting for all three, an he's become pretty facile at writing
scripts in their dedicated scripting languages. Now he wants to learn
something about programming.

He has no interest in becoming a programmer, but he'd like to know something
that may be useful in his work (he had a math minor, and he's now going for
a Masters in applied mathematics). I used to dabble in C and Assembly, so
he's asked me what he should learn. I have no clue.

Some people he works with have recommended Python. I know nothing about it.
I suggested C, but I made the mistake to telling him it's like Latin for a
language major, and he hated Latin. He's not going to be doing anything that
relates to the Web. His interest is mostly in things that will help him deal
with data.

Any thoughts?


By far and away, plain old C is the most useful and durable, and code
written in C will always be able to find a new home.

C++ is far more complex, so I would not start there. But all C++
compilers will happily compile plain old C, which is by design a subset
of C++. (The development went the other way: C++ is a superset of
vanilla C.)


C isn't an exactly subset of C++. It comes pretty close, and it comes
closer yet if the C code in question is written with good style.
Certainly if you say "All C++ compilers will happily compile C that is
_well written_ to _modern coding standards_", then you'll be much closer
to the mark.

Here's the story from the Stroustrop's mouth, with examples:
http://www2.research.att.com/~bs/bs_...ml#C-is-subset

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html