Jump to content

Recommended Posts

Posted

Off topic: gotta love when the mod replies, it's like an official formatted response

On topic: thank you for you explanation I'll make sure to look into that link, also what's kotlin?

Posted

Pattern Matching, Lambda's and many other features far exceed that of java.

 

Pattern Matching is effectively a Switch/Case statement on steroids... In Java 8 the Switch statement has been improved to allow things like switch with Objects such as strings, rather then just primitives. But it's not as good as scala. Lambda's also are in Java 8, but the problem is, you cant expect everyone to update to a "beta" version of java to use your mod.

 

That leads me to my next point. Everything is done using JVM, there is no language levels etc. Which means you can use all the fancy stuff like pattern matching/lambda's, while still using Java 7, which most users have installed on their PC.

 

Test have show That scala is only 3x slower then C.... Now this is probably not a perfect statistic. But to me that is fairly decent for the type of language it is. It's basically on par with Java, Runtime wise, with writing less code. to look at this more in depth go here http://benchmarksgame.alioth.debian.org/

 

Its a diverse language, while Java is Object orientated, scala is both Object and Function based. However this is only a good thing if you use it appropriately, Attempt to think in the Scala train of thought, rather then Java, there are heaps of youtube videos on this.

 

Objects/Class separations fixes alot of the confusions people have with the static modifier in java, in my mind it is easier to understand.

 

Although languages such as groovy follow closer too Java syntax, Scala isn't that hard to grasp, It's not like learning an entirely new language. It's clear and simple to understand.

 

Personally for me (as I am currently moving from java to scala). It's like when i moved from Eclipse Kepler to IntelliJ IDEA. I doubt I will ever look back. I do think it will take a month or two for me to fully start to understand scala, but when I do I feel that it's a direction I would like to head.

 

It seems that Scala is improving at a faster rate then java, and you aren't restricted by versions. For instance: We wont be able to use Java 8 functionally for a long time, because the userbase has to update their Java install, whereas as soon as scala updates, you can instantly use the new features in your code, the compiler sorts out the rest.

 

I just recently updated my mod to 1.7 (Thats coded in Java), however I decided to start the conversion to scala (although I'm think an interior mod rework is on the cards at the same time as I convert haha, especially while I wait for deobfuscation/an "Official" 1.7.4 forge version to be released)

 

If you want more information watch this speech (this is the source of most of my information)

The difference between stupidity and genius is that genius has its limits. - Albert Einstein

  • 3 weeks later...
Posted
  On 1/8/2014 at 10:22 AM, BigDaveNz said:

Pattern Matching is effectively a Switch/Case statement on steroids... In Java 8 the Switch statement has been improved to allow things like switch with Objects such as strings, rather then just primitives.

 

Java 7 allows that, too. http://docs.oracle.com/javase/7/docs/technotes/guides/language/strings-switch.html

 

I am also thinking of writing my mods in Scala. However, I want my mods to be compatible with older minecraft versions (1.4.7+). Did forge support scala back then?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • UPDATE: this seems to be an Arch-specific issue. Switching to Ubuntu server fixed EVERYTHING.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.