C# as first language

  • (2 Pages)
  • +
  • 1
  • 2

20 Replies - 7589 Views - Last Post: 03 November 2008 - 12:20 PM

#1 Isochron  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 28-October 08

C# as first language

Posted 29 October 2008 - 10:00 AM

Hello all,
I have a question. Would C# be good as my first language? I am not a computer newbie, I have studied a little of C++ before, and loved it. For some reason unknown to my current self, I stopped. That was before C# came into being. Should I start where I left off and finish learning C++ or move on to C#? I have a few concerns:

1. I don't really want people to have to have the .NET Framework to run programs.
2. I hate Visual Basic syntax. If C# looks and writes like VB, it's out. I love writing/reading C++, so the more like C++ the better (as far as syntax)
3. I don't want to learn a language that soon nobody will use.
4. I'm only going to make stuff for Windows, so if C# only works on windows then that's ok, but I don't want to use any Microsoft compilers.

I put this in the C# section because I already know about what C++ is, but not much about C#. Hopefully you will be able to help me with this dilemma. Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: C# as first language

#2 todiefor  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 81
  • Joined: 29-October 08

Re: C# as first language

Posted 29 October 2008 - 10:08 AM

In any type of programming, English is supposed to be the first language, the computer's compiler is written such that the commands make more sense that way. But yes, if you are looking for computing, then C# would be a good one to start with, unless you're doing web designs then Java would be a good first computing language.

Oh, stay away from VB... Very far away!

This post has been edited by todiefor: 29 October 2008 - 10:09 AM

Was This Post Helpful? 0
  • +
  • -

#3 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: C# as first language

Posted 29 October 2008 - 12:15 PM

you could say that C# is the marriage of C++ and Java. The syntaxes are similar.
Was This Post Helpful? 0
  • +
  • -

#4 Isochron  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 28-October 08

Re: C# as first language

Posted 29 October 2008 - 01:15 PM

View Posteclipsed4utoo, on 29 Oct, 2008 - 12:15 PM, said:

The syntaxes are similar.


Of what, Java and C# or C++ and C#? I also want a general purpose language, I have heard that C# is not. Is that true?

This post has been edited by Isochron: 29 October 2008 - 01:36 PM

Was This Post Helpful? 0
  • +
  • -

#5 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: C# as first language

Posted 29 October 2008 - 01:48 PM

View PostIsochron, on 29 Oct, 2008 - 04:15 PM, said:

View Posteclipsed4utoo, on 29 Oct, 2008 - 12:15 PM, said:

The syntaxes are similar.


Of what, Java and C# or C++ and C#? I also want a general purpose language, I have heard that C# is not. Is that true?


the syntax between all three are similar.

example....here is a for loop in all three languages.

for (int number = 1; number <= 12; number++) 
{
    System.out.println(number);
}



for (int number = 1; number <= 12; number++)
{
     Console.WriteLine(number)
}



for (int number = 1; number <= 10; number++) 
{
     cout << number;
}



notice how all three have the exact same syntax.

however, this is what a for loop in VB.Net would look like...

For number As Int32 = 1 To 12
     Console.WriteLine(number)
Next



as for a "general purpose language", I don't exactly know what you mean by that. However, I don't think there is much(if any) that you could do in C++ that you can't in C#.

This post has been edited by eclipsed4utoo: 29 October 2008 - 01:49 PM

Was This Post Helpful? 0
  • +
  • -

#6 Isochron  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 28-October 08

Re: C# as first language

Posted 29 October 2008 - 07:20 PM

Yeah, VB sucks (for me), no two ways about it.
But anyways, I wish C# didn't have dot syntax (i think that's what it is). I hate .syn. It reminds me of Actionscript, which seems and feels like a "fake" language. Hopefully learning C# will overcome that feeling. I chose to learn C# because that's the way things are headed. Thanks.
Was This Post Helpful? 0
  • +
  • -

#7 wingot  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 52
  • Joined: 13-October 08

Re: C# as first language

Posted 29 October 2008 - 08:45 PM

View PostIsochron, on 29 Oct, 2008 - 07:20 PM, said:

But anyways, I wish C# didn't have dot syntax (i think that's what it is). I hate .syn. It reminds me of Actionscript, which seems and feels like a "fake" language. Hopefully learning C# will overcome that feeling. I chose to learn C# because that's the way things are headed. Thanks.


Err, doesn't C++ use dot syntax for objects? And all Java and C# have done is make everything an object, whereas C++ tacked objects on top of C and so was never optimally placed to use OOP.

I could be wrong, but I thought C++ did use dot syntax for objects :).

Also, from what I've seen in most languages these days, the OOP paradigm and dot syntax both seem to be prevailing a lot. Perl is the main exception I can think of that is trying to do everything it can to avoid the syntax, but that generates problems of its own.
Was This Post Helpful? 0
  • +
  • -

#8 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: C# as first language

Posted 30 October 2008 - 05:38 AM

View PostIsochron, on 29 Oct, 2008 - 10:20 PM, said:

Yeah, VB sucks (for me), no two ways about it.
But anyways, I wish C# didn't have dot syntax (i think that's what it is). I hate .syn. It reminds me of Actionscript, which seems and feels like a "fake" language. Hopefully learning C# will overcome that feeling. I chose to learn C# because that's the way things are headed. Thanks.


the "dot" syntax is the .Net Framework. That will be part of any language that uses the .Net Framework. It really has nothing to do with the language.
Was This Post Helpful? 0
  • +
  • -

#9 Isochron  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 28-October 08

Re: C# as first language

Posted 30 October 2008 - 06:24 AM

View Posteclipsed4utoo, on 30 Oct, 2008 - 05:38 AM, said:

the "dot" syntax is the .Net Framework. That will be part of any language that uses the .Net Framework. It really has nothing to do with the language.


Then, Can C# be seperate from .NET so I don't have to use it? I can program "just C#" so to speak?
Was This Post Helpful? 0
  • +
  • -

#10 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: C# as first language

Posted 30 October 2008 - 07:10 AM

View PostIsochron, on 30 Oct, 2008 - 09:24 AM, said:

View Posteclipsed4utoo, on 30 Oct, 2008 - 05:38 AM, said:

the "dot" syntax is the .Net Framework. That will be part of any language that uses the .Net Framework. It really has nothing to do with the language.


Then, Can C# be seperate from .NET so I don't have to use it? I can program "just C#" so to speak?


no. the "dot syntax" is basically part of every object oriented programming language. Java, Javascript, VB.Net, C#, C++(kinda) all use it. If you don't want to use it, then I would suggest using a non-object oriented language.
Was This Post Helpful? 0
  • +
  • -

#11 trotski  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 146
  • Joined: 04-September 08

Re: C# as first language

Posted 30 October 2008 - 08:53 AM

Quote

2. I hate Visual Basic syntax.


Me too. C# is the favourite language of .NET programmers. If you don't want to program in .NET, that's not a good move, most of jobs today require .NET and Visual Studio skills. And as far as C is concerned, a good language to start (the esoteric data types will make your brain work). C++ is also a very good option. But there's a lot of repetition in C and C++, Pointers, References and such terms are in some way or other same. C# has no repetition. Don't waste any of your time deciding for a language (and don't switch like I do), just learn C#.
Was This Post Helpful? 0
  • +
  • -

#12 Isochron  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 28-October 08

Re: C# as first language

Posted 30 October 2008 - 09:37 PM

Is C# just C++ but with a lot of useful stuff added in? And Visual Studio and it's free counterparts are the only compilers for C# right?

This post has been edited by Isochron: 30 October 2008 - 09:41 PM

Was This Post Helpful? 0
  • +
  • -

#13 gabehabe  Icon User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1376
  • View blog
  • Posts: 10,951
  • Joined: 06-February 08

Re: C# as first language

Posted 31 October 2008 - 03:40 AM

Quote

1. I don't really want people to have to have the .NET Framework to run programs.

Then .NET isn't for you.

Since you like C++ you could try wxWidgets~ it's a cross platform GUI toolkit, and all you have to do is package your application with the wxWidgets drivers. However, the syntax is quite different compared to standard ANSI C++

Here's an example on creating a window:
#include <wx/wx.h>

class MainApp : public wxApp {
    public:
        virtual bool OnInit();
};

bool MainApp::OnInit() {
    wxFrame *content = new wxFrame(NULL, wxID_ANY, wxT("Hello cliche! Hello wxWidgets!"), wxDefaultPosition, wxSize(350, 150));
    content->Show(true);

    return true;
}

IMPLEMENT_APP(MainApp)


I've written some tutorials~ check my contributions. I'd recommend reading up on it before deciding you want to use it, since like I said, it's quite different to the standards that you're most likely used to.

Hope this helps. :)
Was This Post Helpful? 0
  • +
  • -

#14 Isochron  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 28-October 08

Re: C# as first language

Posted 31 October 2008 - 06:45 AM

Alright, thanks. I am also learning C# right now to see if I like it. The whole thing I liked about C++ though, was the syntax of it. I learned it as my VERY first language, and you know how if you see something done one way your very first time, any way else doesn't seem right. But programmers don't always have the luxury of choosing what language they learn if they want to make a living on it. It wouldn't be smart to learn an old language if there was something newer and perhaps 'better'.
Was This Post Helpful? 0
  • +
  • -

#15 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: C# as first language

Posted 31 October 2008 - 04:03 PM

I love C#. It is my favorite language. I was a VB.NET programmer until I switched.

I think that C# is a more natural language to learn. When you have VB.NET code you have to write out a whole bunch of crap like Dim and As, after a while it gets annoying. Where as C# you just write the Class name then what you want to call it. It saves a lot of time.

Anyways that was for C# and VB.NET, but this is for C++.

I know some C++, but I think that it just takes to long. I would rather use VB.NET than C++, because of the syntax. I hate having to write -> all the time instead with VB.NET and C# you write .


Also if you like both languages you can use more than one language. I know I do!
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2