Like Tree2Likes

What language is best for a beginner in programming?

This is a discussion on What language is best for a beginner in programming? within the Tech Board forums, part of the Community Boards category; Hi! We are four students studying at School of Engineering, Jönköping University in Sweden. We are currently working on a ...

  1. #1
    Registered User
    Join Date
    Feb 2014
    Posts
    1

    What language is best for a beginner in programming?

    Hi! We are four students studying at School of Engineering, Jönköping University in Sweden. We are currently working on a project regarding three programming languages, Java, C# and Python. In this project we’re doing a survey on which one is the most suited for new programmers. We would appreciate if you took five minutes of your time to complete our survey.
    Thanks in advance!

    http://survey.rudbeck.nu/?l=en

    Discussion: What language of the three do you think is the most suited for beginners and why?

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    2,510
    python is a really great first language. it is interpreted, so turnaround from edit to run is very fast. it runs pretty fast on modern computers, and can do nearly anything that can be done with either of the other two languages you mentioned. the syntax is simple and clean, and the documentation is excellent. the concepts (but not the syntax) learned from python can be transferred to any other language, and applied to great effect. unlike Java and C#, Python is a multi-paradigm language. you can write object-oriented or procedural code, and integrate them in one project. the other two are more-or-less OO-only.
    Code:
    namespace life
    {
        const bool change = true;
    }

  3. #3
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    1,206
    My school started out with Java and I liked it. I had a physics course where the professor wanted to do all the homework in python and I hated it. C# doesn't count as a proper language because it isn't cross-platform.

    That being said, python is great but I am not a fan of its syntax. I do enjoy Java and have never tried C# because Linux. And yes, I know about mono but eh....

  4. #4
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    974
    If I had to pick out of the bunch, I wouldn't pick at all.

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,820
    Well, it's a tough one because there's just no perfect language for everyone.
    But if I'd have to choose between these 3, I'd pick C#.
    Bear in mind that I am no expert on these languages, and I have had 0 experience with python. This post comes mostly from just experience, not from expertise.
    Java is disqualified because it disallows operator overloading, lacks any RAII concept and relies on dynamic typing.
    Python is disqualified because it uses dynamic typing and run-time binding rather than static typing and compile-time binding. At least, that's what I read from Wikipedia.
    What's left is C#, which, while not perfect, is the most sensible among these languages. Bear in mind, I have no idea if it supports a strong static typing or operator overloading. But it does support the RAII concept in an easy way.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,670
    Python; it's probably the most friendly to beginners, because it's the cleanest and adheres the PoLA the best of the 3. Python is well received by expert programmers as well.

    Quote Originally Posted by Elysia View Post
    Python is disqualified because it uses dynamic typing and run-time binding rather than static typing and compile-time binding.
    More often than not, that's perfectly fine, and is certainly no reason not to teach it to a noob!

    Quote Originally Posted by Elysia View Post
    What's left is C#, which, while not perfect, is the most sensible among these languages.
    C# is fine, if you're in to BDSM. But if you're not, stay away from .NET.
    Epy likes this.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  7. #7
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,820
    Quote Originally Posted by Yarin View Post
    More often than not, that's perfectly fine, and is certainly no reason not to teach it to a noob!
    *shrug* I find that non-strongly typed languages bring much Evil™ to the world. Runtime type checking is almost as bad as no typing at all.
    This may, of course, just be my preference.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    1,206
    But C# isn't cross-platform though.

    I don't care how much money Microsoft has or their share of the market or even if this leads to a job. Assuming the OP just wants to start learning programming, he should learn it the right way and the "right way" according to me is all about availability to everyone.

    Open-source code is amazing and beautiful and I couldn't ever imagine starting someone off in a language that doesn't support that.

  9. #9
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,820
    Quote Originally Posted by MutantJohn View Post
    But C# isn't cross-platform though.
    C# is cross platform. C# is an open standard, just as C/C++/Java/Python is.

    I don't care how much money Microsoft has or their share of the market or even if this leads to a job. Assuming the OP just wants to start learning programming, he should learn it the right way and the "right way" according to me is all about availability to everyone.
    C# works on Windows and Linux. Dunno about Mac, but that covers a lot of people.

    Open-source code is amazing and beautiful and I couldn't ever imagine starting someone off in a language that doesn't support that.
    Open source != Portable.
    Different concepts. C# can be just as open source as anything else.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    974
    John, look up mono...

  11. #11
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,670
    Quote Originally Posted by Elysia View Post
    I find that non-strongly typed languages bring much Evil™ to the world.
    I agree. The ironic part is that it's actually C & C++ are weakly typed and Python that's strongly typed.

    Quote Originally Posted by Elysia View Post
    Runtime type checking is almost as bad as no typing at all.
    Runtime type checking and typelessness are apples and oranges. Compile time checking certainly has some advantages over runtime checking, but none likely to be of consequence to a noob.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  12. #12
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,820
    Quote Originally Posted by Yarin View Post
    The ironic part is that it's actually C & C++ are weakly typed and Python that's strongly typed.
    C++ is hardly weakly typed, though there certainly are a few languages that are a little stricter with implicit conversions...

    Runtime type checking and typelessness are apples and oranges. Compile time checking certainly has some advantages over runtime checking, but none likely to be of consequence to a noob.
    You know what they - you don't what you're missing out on unless you've experienced it!
    If you start with a language with weak typing, you don't know what you're missing out on!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,670
    Quote Originally Posted by Elysia View Post
    If you start with a language with weak typing, you don't know what you're missing out on!
    Again. Python is strongly typed.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  14. #14
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,344
    Python is disqualified because it uses dynamic typing and run-time binding rather than static typing and compile-time binding.
    O_o

    I hate to burst your bubble, but most of the features you are so happy to bandy about only exist in C++ thanks to "type erasure".

    You know that fancy `std::shared_ptr<???>', `std::function<???>', and `std::bind'? You don't get any of them without "type erasure".

    Just so you have no confusion, "type erasure" exists solely to mimic dynamic binding in C++.

    Look long at the second parameter for the `std::shared_ptr<???>' constructor. You are only allowed to pass anything--following the "deleter" provisions--for the argument because an object is instantiated during program execution to adjust, store, and later destroy what may be a completely unrelated type.

    Within the `std::shared_ptr<???>' object a handle is held referencing the "deleter", but you do not have any access to the underlying "deleter" actually referenced.

    That isn't where "type erasure" ends. The type of the smart pointer is just `std::shared_ptr<???>'; the actual "deleter" is completely unrelated and never addressed by client code. A client only sees a reference or a copy of a `std::shared_ptr<???>' object assuming the creator of the original instance provided a valid "deleter", but you can't actually check that the "deleter" is valid. The types don't even need to match up in a meaningful way because the "deleter" is only ever called with a specific interface which can accidentally be violated.

    You have to jump through a lot of hoops in C++ to only mimic "dynamic binding", and when you are done jumping those hoops, the object--the `std::smart_ptr<???>'--is no more safe than similar Javascript/Python/Ruby.

    Code:
    class OExample(object):
        def __init__(self, fRoutine, fObject):
            this.mRoutine = fRoutine
            this.mObject = fObject
        def destroy():
            this.mRoutine(this.mObject)
    C++ is hardly weakly typed, though there certainly are a few languages that are a little stricter with implicit conversions.
    You are confusing "strong typing"/"weak typing" with "dynamic binding"/"static binding" and "inherited polymorphism"/"use polymorphism".

    C/C++/C#/Java/Javascript/Python/Ruby all have some aspects from all six categories.

    Python is purely "dynamic typing", but of course, C++ has both.

    Python is "strongly typed" in the same way that C++ is "strongly typed"; you rarely get conversions if you don't explicitly ask for such conversions.

    Where you lose the argument is found in "inherited polymorphism" versus "use polymorphism"; you confuse these issues to your detriment. The best C++ is built on "use polymorphism", and languages with easily accomplished "monkey patching" do "use polymorphism" better than any other.

    Code:
    template <typename F> void Go(F f){f(0);}
    Yes. In C++ `F' is "strong typing" and probably "static binding", but you should not care in any way; the use of `Go' determines the polymorphism contract and so "correctness" not the types involved.

    Soma
    “Often out of periods of losing come the greatest strivings toward a new winning streak.” -- Fred Rogers
    “Salem Was Wrong!” -- Pedant Necromancer

  15. #15
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,820
    I'm not defending C++ here... it has its issues, as do all languages. You mention some [of those issues] - e.g. dynamic binding.
    Regardless, it's good that Python is strongly typed, but it's still not statically typed (yes, I'm aware certain aspects of C++ is dynamically typed and I don't like those either), which makes it just as bad in my opinion, and that is why I would still recommend C#.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++(new to any computer language) beginner
    By bba in forum C++ Programming
    Replies: 3
    Last Post: 12-29-2005, 10:09 AM
  2. What's the Difference Between a Programming Language and a Scripting Language?
    By Krak in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 07-15-2005, 04:46 PM
  3. Beginner's Language Paper
    By Thantos in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 01-04-2004, 04:48 PM
  4. Which is a better beginner's language
    By Thantos in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 12-08-2003, 09:50 AM
  5. Beginner needing help in C language
    By chauncey005 in forum C Programming
    Replies: 2
    Last Post: 09-26-2003, 02:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21