Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Which object orientated language

Options
  • 20-04-2009 12:56pm
    #1
    Registered Users Posts: 3,971 ✭✭✭


    I'm going back into part time education this September, which I am hoping will eventually lead to the possibility of doing a PhD. So hoping to move out of industry and into academia. The course I will be doing is heavily based on UML and Object orientated programming. Probably makes up a good 30-40% of this course. Apparently you can use any OO language of choice but Java and C# are the 2 most common languages which have been suggested to me by people teaching this course. I have not really done much OO programming since my C++ and VB days some years ago and I have dabbled a little with C# (did a 1 week course). So I basically have 4 months to get up to speed. I need to pick a language and stick with it. When properly motivated I'm generally good at study/programming, and I feel 4 months working hard will be a good primer for this course. What would people recommend ? What is most beneficial in the job market isn't a major factor for me right now, though people who are currently looking for programming positions have told me there seems to be a higher demand for java programmers out there at present.


Comments

  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    There are really very similar languages (syntax wise in any case) so whichever one you chose you will find it quite easy to learn the other.

    I would say since you have a reasonable knowledge of C# you might as well learn a bit of java. I am sure some else will come along and say that if you are familiar with c# you should contine to master it. :)

    There does seem to be a fair few more java than c# jobs about, but bear in mind that java has been around much longer. Also I would bet that a substantial number of companies that use .net would still have a large vb codebase to maintain and are still using it, possible slowing phasing in c# in newer projects ( There are zero compelling reasons to change an existing vb project to c#). I know of two companies where this transition is happening so I am sure there must be more. So I do think that it will gain more market share in the coming few years.


  • Registered Users Posts: 3,971 ✭✭✭Flaccus


    Thanks for the advice mate.


  • Registered Users Posts: 101 ✭✭jimbo007


    Flaccus wrote: »
    I'm going back into part time education this September, which I am hoping will eventually lead to the possibility of doing a PhD. So hoping to move out of industry and into academia. The course I will be doing is heavily based on UML and Object orientated programming. Probably makes up a good 30-40% of this course. Apparently you can use any OO language of choice but Java and C# are the 2 most common languages which have been suggested to me by people teaching this course. I have not really done much OO programming since my C++ and VB days some years ago and I have dabbled a little with C# (did a 1 week course). So I basically have 4 months to get up to speed. I need to pick a language and stick with it. When properly motivated I'm generally good at study/programming, and I feel 4 months working hard will be a good primer for this course. What would people recommend ? What is most beneficial in the job market isn't a major factor for me right now, though people who are currently looking for programming positions have told me there seems to be a higher demand for java programmers out there at present.

    I've been down that road, did a PhD with a small amount of Java and C++ experience and switched to C# for the PhD. Personally I'd go along the lines of what marco_polo suggested others would say and continue with C# and master it! In terms of jobs, I would reckon (but I could be wrong) that if there are more Java roles out there, there are more Java people to fill these roles... and I think the market is slowly changing on this anyway... I agree with marco_polo that it's gaining market share... I reckon that no matter which language you go with, writing the PhD is going to be harder than any software development you do :)


  • Moderators, Technology & Internet Moderators Posts: 1,335 Mod ✭✭✭✭croo


    Since we are talking purely academia... Java and C# are both (I believe) descendants of C++ which is turn a descendant of C... not very object orientated. Smalltalk, however, was Object Orientated from its inception. It's a reflective language meaning that it is built in smalltalk itself, so you can modify or inherit from the very foundation of the language itself. I always had a soft spot for it myself, but it didn't seem to catch on commercially. Might be something different to consider though.


  • Registered Users Posts: 981 ✭✭✭fasty


    I dunno... C++ is as object oriented as you make it and C# is pretty object oriented. They're no decendants as much as they are languages that use a similar syntax.

    Encapsulation, Inheritance, Polymorphism... all supported by C++ and C#. Although in C++ it's pretty much optional!

    Still, if you're interested in something akin to smalltalk, you could try Objective C (a superset of C no less! ;)). It's quite a nice language.


  • Advertisement
  • Closed Accounts Posts: 25,848 ✭✭✭✭Zombrex


    The best thing you can do is get a good understanding of what Object Orientation actually is, which is something that a lot of programmers lack. The language is some what secondary to that.

    The problem with a lot of languages is that the OO aspect is not enforced so people think they are doing proper OO programming but often it is more of a fudge. For example get and set methods that pass data is not OO programming, but people think well I've got my object, and I'm accessing my data through a method, so I must be doing OO.

    Ultimately OO programming is objects passing messages to each other. If you are passing bits of data around you are doing procedural programming. Nothing wrong with that but it is not OO and using objects to do that becomes messy, you are better off with a language like C.

    The data is (or should be) irrelevant and should be hidden as much as possible. The point of that is that it allows you to change the data without effecting anything but the class that uses it (ie an int to a float). Nothing else should be aware of that change. If another object expects an int from a get() method then you are not doing OO. You do not ask and object for data in order to do something with it (ie a getter method), you tell the object to do something with it's own data. And nothing else should know what that data is or how it is structured.

    You can do that in C++ so long as you know what you are doing. You can also not do it in C++ and C# and Java.

    But to answer your question, Java, pick Java :D


  • Moderators, Technology & Internet Moderators Posts: 1,335 Mod ✭✭✭✭croo


    fasty wrote: »
    I dunno... C++ is as object oriented as you make it and C# is pretty object oriented. They're no decendants as much as they are languages that use a similar syntax.

    Encapsulation, Inheritance, Polymorphism... all supported by C++ and C#. Although in C++ it's pretty much optional!

    Still, if you're interested in something akin to smalltalk, you could try Objective C (a superset of C no less! ;)). It's quite a nice language.
    Ok, perhaps I worded that wrong.
    I didn't intend to say that C++ or C# were less objected orientated or that C# was directly descended from C ... as I understand it C# came about when SUN objected to Microsoft releasing J++ which was a modified Java. So C# is more probably a descendant of Java. And while Java is not C++ there is a definite resemblance there.

    I only suggested smalltalk as it was, in my day, considered a good OO learning language. I guess because it was sufficiently different that it wasn't possible to fall back into habits you had picked up using other languages.

    ps. Squeak is a nice opens source smalltalk-80 compliant environment
    http://www.squeak.org/
    And if you wished to do some web based development with it, seaside is a nice webserver developed using squeak. http://www.seaside.st/


  • Closed Accounts Posts: 25,848 ✭✭✭✭Zombrex


    croo wrote: »
    I only suggested smalltalk as it was, in my day, considered a good OO learning language. I guess because it was sufficiently different that it wasn't possible to fall back into habits you had picked up using other languages.

    It is a good suggestion. Smalltalk has the concept of message passing defined rather explicitly, where as in C++ and Java message passing is done in the form of calling a method (this is how it works in Smalltalk as well but the syntax if clearer) on the object which can be confusing if the programmer is used to procedural programming.


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    croo wrote: »
    Ok, perhaps I worded that wrong.
    I didn't intend to say that C++ or C# were less objected orientated or that C# was directly descended from C ... as I understand it C# came about when SUN objected to Microsoft releasing J++ which was a modified Java. So C# is more probably a descendant of Java. And while Java is not C++ there is a definite resemblance there.

    I only suggested smalltalk as it was, in my day, considered a good OO learning language. I guess because it was sufficiently different that it wasn't possible to fall back into habits you had picked up using other languages.

    ps. Squeak is a nice opens source smalltalk-80 compliant environment
    http://www.squeak.org/
    And if you wished to do some web based development with it, seaside is a nice webserver developed using squeak. http://www.seaside.st/

    Yep, C# is effectively a Java copy, with some influence from Object Pascal (same designer). The C++ style of object orientation is rather different to the Smalltalk one; another smalltalk-style language is Objective C.


  • Registered Users Posts: 32,417 ✭✭✭✭watty


    It isn't relevent if your language IMPLEMENTS OOP via messages, stack, data, objects or whatever. Those are just means to an end, ways of implementing OOP

    C++ "worked" originally as a pre-processor for C. You can write OOP in C. It just requires more self disciple and has less compiler checking.

    You can write beautifully indented programs in Pascal that arn't sctructured and woeful programmes in Java, C++, C# (I've had the misfortune to re-write some, as that was easier than modify or fix), Oberon or Smalltalk.

    OOProgramming is a mindset for certain problems. As is Dataflow programming, state machines or other techniques.

    Unfortunately most Java, C++ and C# programs are written in C. Heck they even added printf to Java. Some people can write Fortran in any language. Some people can write good software, some of that uses the concept of Objects.

    C# is really MS answer to Java, and I'm not an MS fan, but it overcomes some serious stupidities in C++ (which AT&T inisted on and B.Strustrupp didn't want).

    Occam can do some cool stuff C/Java/C#/C++ can only dream of yet has direct no OO syntax/features at all. Modula-2 is the leaner meaner cousin of Bloated Ada, and using Opaque Modules, Procedure rather than data passing and true generic functions you can do SECURE reliable OOP even though it hasn't got as good a syntax for it as C++. It also has built in thread/Multicpu/process features that let you easily mimic Occam in a way that can only be done badly with OS support on C++. Oberon is supposed to be the more OO successor to Modula-2, unfortunately it also makes it nearly useless for easily writing programs for Linux or Windows. It kind of needs its own OS.

    RealLife (tm) is not simple.

    You can even have your cake and eat it, though my limit was mixing C, C++, Modula2 and VB6 in one program. Java though uses alien DLLs *SO BADLY* ... I've rewritten entire Java program in C# because I needed better API/DLL use.

    Your program has to talk to the OS. Linux is well, a copy of a 1976 OS, so how OO is it? Win is an unbeleivable hodge podge of good ideas and bad, really a mix of VMS, DOS, Win3.x, OS/2 and later NT ideas overlaid with Win9x/Me/Vista insanity. Not much is OO.

    This tend to spoil the neatness and logic. There is a solution Write an OO layer to hide it! Unfortunately a bunch of classes for each API family doesn't make it OO, even if it might make usage a little more logical. An OO OS is somewhat more radically different.


  • Advertisement
Advertisement