C++ or C#..?

  • Thread starter Thread starter Sobin
  • Start date Start date
colin said:
im interested in the sort of thing you refer to ?

Templates, smart pointers etc..
I remember it took me a long time to find the right page wich told me how to
print out
a simple hex dump with 2 hex digits for each byte,
I found 100s of pages wich told me how to print out the basic stuff with
String.Format but stoped short of saying how to print out exactly 2 digits.
most other things I seemed to find fairly easy.

I admit that http://blog.stevex.net/index.php/string-formatting-in-csharp/
is much better than the official docs.

Arne
 
Sobin said:
Hi,
I am new to programming...which language should I study
to get a hot job. is it C# or C++...?
Thanks In advance
Sobin

Neither of those is a very good first language. Actually, object-oriented
*anything* isn't a good first language. Start with something that starts
executing at the top of the file and goes until it hits the bottom, maybe
python (perl and tcl also qualify but are going out of vogue, maybe ruby
would be another good alternative, even straight C wouldn't be too bad but
there's still some -- to the beginner -- magic incantations to learn to get
a program started).

Then, once you've mastered simple I/O, loops, and arithmetic, and are ready
for some file access or graphical windows, switch to an object-oriented
language or learn the O-O extensions to the language you started with.

I would basically have the following rule: don't start with any language
where "hello world" is more than five lines. Here's the C version for
reference, exactly five lines:

#include <stdio.h>
int main( void )
{
puts("Hello world\n");
}

OTOH C#:

using namespace System;
public class MyProgram
{
public static void Main(void)
{
Console.WriteLine("Hello World");
}
}

As you can see, there's a lot of extra junk that you won't learn for a
while.

Whereas PERL has no fluff:

print "Hello world\n";
 
Ben said:
Neither of those is a very good first language. Actually, object-oriented
*anything* isn't a good first language. Start with something that starts
executing at the top of the file and goes until it hits the bottom, maybe
python (perl and tcl also qualify but are going out of vogue, maybe ruby
would be another good alternative, even straight C wouldn't be too bad but
there's still some -- to the beginner -- magic incantations to learn to get
a program started).

Then, once you've mastered simple I/O, loops, and arithmetic, and are ready
for some file access or graphical windows, switch to an object-oriented
language or learn the O-O extensions to the language you started with.

Personally I agree that a simple procedural programming language
is better to start with than an object oriented one.

But it is far from universal accepted.

Arne

PS: I would prefer a language like Pascal over the dynamical typed
languages.
 
Arne
PS: I would prefer a language like Pascal over the dynamical typed
languages.

That's a good point. Pascal is one of the languages I've never come in
contact with, but if it makes life as simple as "(1) load IO library (2)
print something" then I imagine it would be a very good choice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top