Programming Language

By Jaf ยท 45 replies
Apr 19, 2004
  1. Phantasm66

    Phantasm66 TS Rookie Posts: 5,734   +8

    After reading your post I must admit I have to agree with every word.

    I prefer Java but many, many programmers prefer C++, as it is possible to do some wonderful things with this that compile into fast running executables. Its a VERY powerful language and where a great deal of the magic is still going on in a big way.

    And yes indeed, simple C++ does indeed work on different platforms. And also yes when one starts to use APIs this ceases to be the case, yes. I have programmed using Winsocks for network programming in C++ under UNIX and Windows and they were indeed different in many places. I can only assume other APIs differ much more greatly as well.
  2. Nic

    Nic TechSpot Paladin Posts: 1,549

    If you plan on writing useful programs for yourself, and you don't want to spend months/years achieving something useful, then avoid C++. Its more complex and requires more programming effort to do many things supported by extensive class libraries provided in other languages, such as Java, or any of the .NET languages. Java would seem like your best bet, but I have to say that I don't like Java very much as I don't find it as intuitive as C#, or VB.NET for example (check out Microsoft Visual Studio 2003, which itself was entirely written in C# showing that the .NET languages are VERY powerful and feature rich). Java is VERY popular though, so you'll certainly find it useful to pursuing a career in software development, though IT in general isn't as safe a career bet as it once was.

    Check out this excellent FREE open source development environment for C# and VB.NET development (it's written in C# and the source code is freely available for download) ...

  3. MrGaribaldi

    MrGaribaldi TechSpot Ambassador Posts: 2,512

    Ah, quite true.
    Was mixing recompiling for different cpu's (x86, alpha etc) and platform specific API's. Sorry.

    Anyways, there seems to be alot of people who's got an interest in programming here, with diff opinions.

    I use NetBeans (which is written in Java, and has support for point 'n' click GUI design), whereas Phantasm uses Eclipse... Both are quite good, but I never felt as at home with Ecplise as with NetBeans...
  4. Phantasm66

    Phantasm66 TS Rookie Posts: 5,734   +8

    I've got NetBeans installed as well but I've not used it so far, only Eclipse.

    Why do you feel that NetBeans is better than Eclipse??
  5. MrGaribaldi

    MrGaribaldi TechSpot Ambassador Posts: 2,512

    There was something about the feel of the program...

    I'm downloading eclipse again now to see if I can find anything to put my finger on....


    Hmmm.. So far it crashes my jvm when I try to start it..
    Guess I'll have to do a restart, so the feedback will have to wait a bit longer...
  6. Phantasm66

    Phantasm66 TS Rookie Posts: 5,734   +8

    I had to play with Eclipse a bit to get it the way I liked it, but now it looks for all the world just like Visual Studio 2003 .net only its much better for Java IMHO.

    (If you are going to do C# (highly similar to Java) then almost certainly you need Visual Studio 2003 .net, even if its just the C# bit, and certainly you need to be consulting MSDN.)

    Eclipse has some really good "quick fixes" - as they are called - for some common programming blunders.

    However I have not really tried NetBeans so I think I will if you think its somehow better. What do you really like about it?
  7. Nic

    Nic TechSpot Paladin Posts: 1,549

    Didn't you read my post regarding the FREE open source dvelopment tool (SharpDevelop). It's very similar to Visual Studio 2003 and supports both VB.Net and C#. Check out the features on the home page.


    The features we like most...

    - Forms designer for C# and VB.NET
    - Code completion for C# and VB.NET
    - Code AutoInsert (Ctrl+W) C# to VB.NET converter
    - Completely written in C#
    - Compile C# and VB.NET in the IDE out-of-the-box
    - Open source, GPL licensed
    - Lightweight IDE
    - Xml documentation preview
    - User interface translated to many languages
    - Everything templated: add new project or file types, or even compilers to SharpDevelop

    And here are some more...

    - Write C#, ASP.NET, ADO.NET, XML, HTML code
    - Project or File-based development (Project Scout & File Scout)
    - Rich project options
    - Syntax highlighting for C#, HTML, ASP, ASP.NET, VBScript, VB.NET, XML
    - Intelligent braces
    - Bookmark your code
    - Code template support
    - Feature-rich Find & Replace dialogs
    - Easily extensible with external tools
    - Easily extensible with Plug-Ins

    ... and much more

    If you like to see the features in action, then take our Feature Tour.

    PS: Eclipse looks pretty decent too, and is itself written in Java. Just goes to show what you can do with these languages if you have the skills.
  8. MrGaribaldi

    MrGaribaldi TechSpot Ambassador Posts: 2,512

    Where to start...
    It'll reformat my code to Sun's standard, so it's easy to keep the code well structured even if you don't use that structure...

    If you've forgotten the code, it'll show you a list after a few secs:
    import javax.swing.*;
    import java.awt.BorderFactory.*;
    class Example extends JFrame {
     public static void main(String[] args) {
       JPanel panelWithBorder = new JPanel("to show off EmptyBorder");
    Where it will suggest what is in italics.

    You can also get a complete list of all commands that is available for object your working on, with the javadoc comments from the API (if you have that installed).

    It'll do the same for any other classes you've got in your working directory, which made it quite easy for me to create a GUI to a program I'd written earlier.

    It has point 'n' click GUI creation (like in VB), though I'm not allowed to use that in my classes.
    And it has a debug feature, though I haven't had time to mess around with that one yet.

    It also has a small CVS client built in, and is easy to configure to use a proper CVS server if you have one up and running.

    That's what springs to mind as of right now.

    But it also has a feel that reminds me a bit of emacs/notepad/CrimsonEditor which I used before using netBeans, which I like quite a lot :)
  9. BrownPaper

    BrownPaper TS Rookie Posts: 407

    oh gee, i probably should learn java too as well. but first i need to fully understand everything about c++.
  10. MrGaribaldi

    MrGaribaldi TechSpot Ambassador Posts: 2,512

    From what I've read of C++ it is very similar to Java in semantics and feel, so if you know one, you won't have any truoble learning the other...

    But back to the scheduled IDE war ;)

    Here is a short tour of NetBeans, but it is by no means complete. In version 3.6 which was just released, they've added one thing which to me seems very practical...
    Which are just a few select features that impressed/looked good to me..
    Find more here...

    Alas, I've still not gotten Eclipse up and running... :(
  11. Phantasm66

    Phantasm66 TS Rookie Posts: 5,734   +8

    C++ is lower level than Java. Its not more complex to understand - in a way - its just that it takes more to do certain things, that's all. But that's the key to its power. You've more control but there's more that can, I guess, go wrong.

    Java and C# also do what's known as garbage collection. This means that they clean up their use of memory behind them. C++ doesn't do this so you have to do it yourself and if you don't do it properly then memory problems happen.

    The code in C++ is also more alien to look at, and less uniform.

    However it writes lightening fast applications and the games you are all used to will have been written in C++, using Direct X , open GL, etc that gave the programmer specific commands and functions prebuilt so that he or she could just get down and dirty with writing the game and talking to the graphics card, etc.

    A lot of server side applications that are written in places like my work are already moving (and have moved) over to Java in a big way, but the less buggier and better running applications are still written by crazy C++ gurus. For now.

    Java is more forward looking than C++ now. Java is really embracing aspect oriented programming which is to do with the way classes interact with each other.
  12. Nic

    Nic TechSpot Paladin Posts: 1,549

    You can't write an OS in Java because Java runs on a Virtual Machine, which itself requires to be installed on some kind of OS. Modern OOP languages, such as Java or any of the .NET languages, are both powerful and fast, making software development less likely to suffer from bugs (e.g. memory leaks) and greatly reducing the time required to create an application. Both Java and .NET support DirectX, so 3D accelerated games should pose no problem. For commercial games/software development, then C++ is your best bet.
  13. Nodsu

    Nodsu TS Rookie Posts: 5,837   +6

    Actually you can't write any OS purely in any standard programming language except assembly and Java. Java can be used because there are Java processors out there that can execute Java bytecode directly.
  14. Nic

    Nic TechSpot Paladin Posts: 1,549

    Of course we are talking about avoiding the use of classes that use API calls to the OS in that case, so that means a heavily trimmed down version of Java. Let's not forget that no one has produced a full blown OS for desktop computers that is written in anything other than C/C++ (Linux, Windows, Unix, OSX, etc.). Java still needs a virtual machine to run on (as far as I know), though that could be implemented in hardware.

    Java Processors Supercharge the Next Generation of Java-Powered Networked Consumer Electronics

  15. filthy_mcnasty

    filthy_mcnasty TS Rookie Posts: 78

    just an aside on Nodsu's comment on an OS in assembler....

    *GASP!* lol even the thought is mind blowing. that said, i shall now be forced to write one! (or not)
  16. Nodsu

    Nodsu TS Rookie Posts: 5,837   +6

    There are no OS calling classes in standard Java sepcification. The whole point of Java is that you don't have to know anything about the OS.

    VM is the thing that talks to the OS underneath. But if the VM is done in hardware then you have a platform that you can build an OS on top of using just Java.
  17. Nic

    Nic TechSpot Paladin Posts: 1,549

    Summary ... So with C/C++ you can talk directly to hardware (no VM or OS required), but with Java you talk to a virtual machine, which in turn talks to an OS, though the OS is not necessarily required if the VM is implemented in hardware (not your average PC). Sound about right?
  18. me(who else?)

    me(who else?) TS Rookie Posts: 387

    Couldn't you write an OS which uses the VM software on the Linux kernel? You can get a tiny linux install, so that might work.
  19. Nodsu

    Nodsu TS Rookie Posts: 5,837   +6

    Of course you could write an "OS" running in another OS but that would sort of lose the point of an OS..
  20. Phantasm66

    Phantasm66 TS Rookie Posts: 5,734   +8

    Linux IS the kernel, so basically it would still be Linux.

    You are probably still writing any modern kernel in C, just like the Linux kernel.

    Large portions of future Windows releases will almost certainly be written in C#, which uses a virtual machine of sorts - the Common Language Runtime (CLR) of .net.

    But I bet the kernel is still written in C.
  21. dsmurl

    dsmurl TS Rookie

    DarkBasic called from C++

    Direct X and OpenGl are large and complicated with a steep learning curve. I want to write a game that has a graphics layer writtin in darkbasic to be callable from my background game logic layer writtin in C++. Is there any easy way to do this? - :chef:
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...