Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 35

Thread: Best Coding Language for programming Linux apps

  1. #11
    Join Date
    Sep 2011
    Location
    UK
    Beans
    76
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Best Coding Language for programming Linux apps

    I like C# and its a fairly easy language to get to grips with. There's plenty of documentation about for the starter developer also.

    Having said that though, my personal preference for Linux development is C++ and GTK.

  2. #12
    Join Date
    Feb 2012
    Beans
    24

    Re: Best Coding Language for programming Linux apps

    as mentioned above C and Python
    I think you should go with Python

    • It's easier for beginners
    • You can use it as a scripting language
    • You can also do GUI programs
    • You can write some components of your Python program with C

  3. #13
    Join Date
    Feb 2009
    Beans
    1,469

    Re: Best Coding Language for programming Linux apps

    Well, lest the OP see consensus, I don't like C#, both because it's a proprietary Microsoft language and because it's just generally ugly like the Java clone it is. (Mind you, I have very little practical experience with C#, standard disclaimer applies.)

    My main criticism of Java, which I imagine applies just as well to C#, is that it's an enormous language and you need to know a lot of stuff to use it properly -- a lot of stuff you won't know as a beginner, and you won't understand the reasons for all of it until you've been programming for probably at least a few years. Even C, in my not so humble opinion, would be better for beginners, and I don't recommend C because it's kind of overwhelming itself. It's why you see so many recommendations for Python in threads like this.

  4. #14
    Join Date
    Oct 2009
    Location
    Upminster, Essex, UK
    Beans
    544

    Thumbs down Re: Best Coding Language for programming Linux apps

    Quote Originally Posted by trent.josephsen View Post
    It's why you see so many recommendations for Python in threads like this.
    Yeah. Kinda surprised there isn't a little more love for python here myself - given that GTK/QT + python is the current ubuntu developer mantra

    Likewise there is little love for Mono based apps - wasn't Mono why Banshee got bumped as default player a while back...
    Code:
    cd /fridge/beer | drink && fallover

  5. #15
    Join Date
    Sep 2011
    Location
    UK
    Beans
    76
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Best Coding Language for programming Linux apps

    Quote Originally Posted by trent.josephsen View Post
    Well, lest the OP see consensus, I don't like C#, both because it's a proprietary Microsoft language and because it's just generally ugly like the Java clone it is. (Mind you, I have very little practical experience with C#, standard disclaimer applies.)

    My main criticism of Java, which I imagine applies just as well to C#, is that it's an enormous language and you need to know a lot of stuff to use it properly -- a lot of stuff you won't know as a beginner, and you won't understand the reasons for all of it until you've been programming for probably at least a few years. Even C, in my not so humble opinion, would be better for beginners, and I don't recommend C because it's kind of overwhelming itself. It's why you see so many recommendations for Python in threads like this.
    I feel as though I should defend Java (and to a lesser extent C#) here even though I don't believe its the best language for Linux devs.

    I don't believe the Java language is that much bigger than C++. One of the main benefits of Java is that you don't need to worry about memory management - you can't say that for C++, which immediately makes Java much better for beginners.

    Sure, there's a whole heap of different APIs for doing things in Java, but there again, what language doesn't have these. I wouldn't say that writing a C++/GTK app was easier than a Java/Swing app, most probably the other way around. You learn what you need to learn. For example Java has plenty of support for XML handling, but the average desktop coder probably isn't going to need this and probably won't learn it.

    The best coding language for Linux apps is not necessarily the best language for a beginner. From my point of view the best language is C++, but I'll admit that I'm a novice with Python and that may well be better for some people.

  6. #16
    Join Date
    Jan 2008
    Beans
    1,532

    Re: Best Coding Language for programming Linux apps

    Quote Originally Posted by ve4cib View Post
    If you're writing GUI application then C++, Python, or C# might be the best bets. If it's some low-level kernel module, C is probably the way to go.
    I agree mostly with this, but would definitely not include C++ as a good language for GUI development. The rigidity of C++ along with the burden of memory allocation will make your job harder than it needs to be. Also GUI apps rarely tax your CPU at all so the speed of C++ will be a non-factor.


    Quote Originally Posted by doobrie View Post
    If you're only interested in console apps, then I'd recommend starting with C.

    If you want to do any GUI apps, then C++ may be a better choice, but you can always learn C++ after you've learnt C as the basics are the same.
    C is a good choice for console apps that require a great deal of performance, but these are actually very rare. Something like Python is best for most console apps - especially for a beginner. And, again, C++ is not a good choice for GUI apps at all.


    Quote Originally Posted by trent.josephsen View Post
    Well, lest the OP see consensus, I don't like C#, both because it's a proprietary Microsoft language
    Don't create a false impression. C# was created by Microsoft, but is is an open standard and the Mono implementation is open source, mature and very good.

    Quote Originally Posted by trent.josephsen View Post
    My main criticism of Java, which I imagine applies just as well to C#, is that it's an enormous language and you need to know a lot of stuff to use it properly -- a lot of stuff you won't know as a beginner, and you won't understand the reasons for all of it until you've been programming for probably at least a few years. Even C, in my not so humble opinion, would be better for beginners, and I don't recommend C because it's kind of overwhelming itself. It's why you see so many recommendations for Python in threads like this.
    Actually Java is one of the simplest languages out there. It gives you basically one programming construct - the class. It doesn't have first-class functions, pointers, multiple inheritance, operator overloading, unsigned numbers, stack types, multiple dispatch, delegates, nested functions, free functions, tuples, pattern matching...I could go on.

    If you think Java is "an enormous language", then you know nothing about programming languages.

    To the OP, I would recommend sticking with C#. You already started it, already have a book, and it's quite a decent language. It even has some features that I miss in Java such as tuples, operator overloading, unsigned numbers, and stack types. There is also the Monodevelop IDE and quite a few good libraries on Linux.

    Happy coding.

  7. #17
    Join Date
    Sep 2011
    Location
    UK
    Beans
    76
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Best Coding Language for programming Linux apps

    Quote Originally Posted by Simian Man View Post
    To the OP, I would recommend sticking with C#. You already started it, already have a book, and it's quite a decent language
    Very sensible approach.

  8. #18
    Join Date
    Jun 2007
    Location
    Canada
    Beans
    370

    Re: Best Coding Language for programming Linux apps

    Quote Originally Posted by trent.josephsen View Post
    Well, lest the OP see consensus, I don't like C#, both because it's a proprietary Microsoft language and because it's just generally ugly like the Java clone it is. (Mind you, I have very little practical experience with C#, standard disclaimer applies.)

    My main criticism of Java, which I imagine applies just as well to C#, is that it's an enormous language and you need to know a lot of stuff to use it properly -- a lot of stuff you won't know as a beginner, and you won't understand the reasons for all of it until you've been programming for probably at least a few years. Even C, in my not so humble opinion, would be better for beginners, and I don't recommend C because it's kind of overwhelming itself. It's why you see so many recommendations for Python in threads like this.
    A Java developer was once quoted as saying "C# is what Java would be if Sun had the budget for it." (Or words to that effect; I can't find the exact quote unfortunately.)

    C#, the language, is not proprietary. Portions of the .NET framework on which it tends to rely are, but the language itself is not. And -- at the severe risk of running into a "Mono is evil!" "No, it isn't!" debate -- those few portions of the .NET framework that are at issue have been licensed for free use with Mono, so the proprietary-or-not debate is really a non-issue.

    Personally I think C# is a lot cleaner than Java, and has some really nice features I wish Java had. Things like iterators for for-loops:

    C#:
    Code:
    String[] someStrings = { /*stuff here*/ };
    for(String s in someStrings)
        doSomethingWithEachString(s);
    versus Java:
    Code:
    String[] someStrings = { /*stuff here*/ };
    for(int i=0; i<someStrings.length; i++)
        doSomethingWithEachString(someStrings[i]);
    It's a minor difference, but the C# version is more intuitive to me.

    There's also the nice feature of Properties in C#, instead of explicit Get/Set methods in Java:

    C#
    Code:
    class SomeExampleClass
    {
        private int mustBeEven;
    
        public int Value
        {
            get {return mustBeEven;}
            set {
                if(value % 2 == 0)
                    mustBeEven = value;
            }
        }
    }
    
    ...
    
    SomeExampleClass foo = new SomeExampleClass(2);
    Print(foo.Value);
    foo.Value = 1;
    Print(foo.Value);
    foo.Value = 4;
    Print(foo.Value);
    Java:
    Code:
    class SomeExampleClass
    {
        private int mustBeEven;
    
        public int getValue
        {
            return mustBeEven;
        }
    
        public void setValue(int v)
        {
            if(v % 2 == 0)
                mustBeEven = v;
        }
    }
    
    ...
    
    SomeExampleClass foo = new SomeExampleClass(2);
    print(foo.getValue());
    foo.setValue(1);
    print(foo.getValue());
    foo.setValue(4);
    print(foo.getValue());
    Anyway, that's just my take on the C# vs Java. Java has its uses (e.g. Android development), but given a choice I would prefer to work with C#.

    I agree mostly with this, but would definitely not include C++ as a good language for GUI development. The rigidity of C++ along with the burden of memory allocation will make your job harder than it needs to be. Also GUI apps rarely tax your CPU at all so the speed of C++ will be a non-factor.
    C++ with QtCreator is pretty nice for doing GUI programs. Most of the really hard/annoying parts of laying out the GUI is done via a Visual Studio-style GUI builder. Yes, there's the memory management issue to consider. And that is a major factor for a lot of people. Personally, I've done enough C++ that I'm comfortable with it, which is why I included it as a possible candidate for GUI applications. It wouldn't be my first recommendation to most people, but it is a viable option that deserves mentioning.

    Possibly the biggest advantage of using C++ for a GUI program is that you have very easy access to any C or C++ library you need. And there are thousands (millions?) of those. Yes, many of them have bindings for other languages, but some don't. Or the other language bindings aren't complete, or have performance issues. Something to consider at the very least, depending on what kind of program you're creating.
    GCS/O d+(-@) s: a-->? C(++) UL P+ L+++@ E@
    W++$ N++ !o K++ w(++) !O M(-) !V PS+(++)
    PE-() Y+ PGP++ t++(+++@)* 5++ X++@ R+++@
    tv+ b++(+++) DI++ D+ G+ e++>++++ h- r y?

  9. #19
    Join Date
    May 2007
    Location
    Leeds, UK
    Beans
    1,675
    Distro
    Ubuntu

    Re: Best Coding Language for programming Linux apps

    Quote Originally Posted by ve4cib View Post
    Personally I think C# is a lot cleaner than Java, and has some really nice features I wish Java had. Things like iterators for for-loops:
    While I agree generally with your assessment, Java has had the same style of fast enumeration since 1.5. This works with primitive arrays and collections:

    Code:
    String[] someStrings = { /*stuff here*/ };
    for(String s : someStrings)
        doSomethingWithEachString(s);

  10. #20
    Join Date
    Sep 2011
    Location
    UK
    Beans
    76
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Best Coding Language for programming Linux apps

    The properties feature of C# is nice, but its not something that's overly important to me. I believe it's been talked about for future version of Java, so, someday it'll be there also.

Page 2 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •