Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Java vs Swift

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java vs Swift

    Dear community. I’m new to programming (and posting to forums!) and would be very grateful for your help. I’m a mature student studying for a conversion course in Computing and have written a dissertation comparing Java and Swift for new programmers. Part of this is a ‘guideline’ for new students to object-oriented programming.

    For feedback on the guideline, I’d be really interested to hear if you think I’m right or wrong in what I’ve concluded, and for any comments on which language, as a student of OOP you found to be easiest to learn, had the best IDE, or was of the most relevance.

    Critical evaluation

    • When choosing which language to learn there are multiple factors to consider – ease of learning, working environment (Integrated Development Environment), the raw speed and the relevance of the chosen language; How applicable is it to the intended use?

    • The results of my critical analysis demonstrated that both object-oriented languages are straightforward to pick up, with a wealth of learning materials available. However, of the two programming languages, Swift is easier to pick up do to the more straightforward syntax and fresh and modern learning materials.

    o As an example, there is no ‘main’ method required in Swift and the syntax is certainly more intuitive and readable.

    o While Java is associated with a large volume of learning material, built up over three decades, Swift is only five years old but first and third-party material has a more exciting look and feel about it.

    • In terms of the IDEs, Java certainly wins in terms of choice – there are many IDEs to choose from, and if a student doesn’t like one, it is straightforward to try another. As a personal preference, I found the Xcode interface to be a more pleasing environment in which to work.

    • When it comes to popularity and practical application, Java is the preference - only 7% of developers on stack Overflow (a popular question and answer site for developers) are currently using Swift, compared to Java’s 41% (Stack Overflow, 2019).

    Speed

    • In term of raw speed, my quantitative analysis of the bubble sort and prime decomposition algorithms demonstrated that Java is orders of magnitude faster than Swift when repeatedly processing these looped algorithms. Although this may have a lot to do with the code being run in Swift playgrounds, this significant performance differences may be a deciding factor.

    • The comparatively sluggish speed of Swift may be judged as being ‘worth it’ depending on the intention of the student: If the intention is to work in established, often speed-critical areas, then Java is the clear winner. Alternatively, if iOS development is the end-goal, then the choice should be Swift.

    Recommendations

    • In terms of ease of use and inspirational, modern materials, Swift is an excellent language to learn. Additionally, if programming apps within the iOS environment is the number one goal, then Swift is the clear choice.

    • Should aspiring programmers require a well-rounded introduction to object-oriented programming, while keeping their future goals open, or consider speed to be a significant goal in the applications that they produce, then their decision should be weighted towards Java.

    Let me know what you think...
    Many thanks
    Ian

  2. #2
    Junior Member
    Join Date
    Aug 2019
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java vs Swift

    Dear community. I’m new to programming (and posting to forums!) and would be very grateful for your help. I’m a mature student studying for a conversion course in Computing and have written a dissertation comparing Java and Swift for new programmers. Part of this is a ‘guideline’ for new students to object-oriented programming.

    For feedback on the guideline, I’d be really interested to hear if you think I’m right or wrong in what I’ve concluded, and for any comments on which language, as a student of OOP you found to be easiest to learn, had the best IDE, or was of the most relevance.

    Critical evaluation

    • When choosing which language to learn there are multiple factors to consider – ease of learning, working environment (Integrated Development Environment), the raw speed and the relevance of the chosen language; How applicable is it to the intended use?

    • The results of my critical analysis demonstrated that both object-oriented languages are straightforward to pick up, with a wealth of learning materials available. However, of the two programming languages, Swift is easier to pick up do to the more straightforward syntax and fresh and modern learning materials.

    o As an example, there is no ‘main’ method required in Swift and the syntax is certainly more intuitive and readable.

    o While Java is associated with a large volume of learning material, built up over three decades, Swift is only five years old but first and third-party material has a more exciting look and feel about it.

    • In terms of the IDEs, Java certainly wins in terms of choice – there are many IDEs to choose from, and if a student doesn’t like one, it is straightforward to try another. As a personal preference, I found the Xcode interface to be a more pleasing environment in which to work.

    • When it comes to popularity and practical application, Java is the preference - only 7% of developers on stack Overflow (a popular question and answer site for developers) are currently using Swift, compared to Java’s 41% (Stack Overflow, 2019).

    Speed

    • In term of raw speed, my quantitative analysis of the bubble sort and prime decomposition algorithms demonstrated that Java is orders of magnitude faster than Swift when repeatedly processing these looped algorithms. Although this may have a lot to do with the code being run in Swift playgrounds, this significant performance differences may be a deciding factor.

    • The comparatively sluggish speed of Swift may be judged as being ‘worth it’ depending on the intention of the student: If the intention is to work in established, often speed-critical areas, then Java is the clear winner. Alternatively, if iOS development is the end-goal, then the choice should be Swift.

    Recommendations

    • In terms of ease of use and inspirational, modern materials, Swift is an excellent language to learn. Additionally, if programming apps within the iOS environment is the number one goal, then Swift is the clear choice.

    • Should aspiring programmers require a well-rounded introduction to object-oriented programming, while keeping their future goals open, or consider speed to be a significant goal in the applications that they produce, then their decision should be weighted towards Java.

    Let me know what you think...
    Many thanks
    Ian

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Java vs Swift

    Moved to a discussions area

    Also posted here: https://coderanch.com/t/714277/languages/Swift-Java
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Ever tried Swift via xcode?
    By hereZz in forum Other Programming Languages
    Replies: 3
    Last Post: September 3rd, 2014, 07:28 AM
  2. SWIFT MT103 Message
    By Everlyn Mbula in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 8th, 2013, 07:35 AM