Sign in to follow this  
taktaz208

c# or java

Recommended Posts

Posted (edited)

Hi , I have 2 questions , If you answer i'd be so appreciated

 

Q1: What do you prefer for scripting in RAGE (C# or JAVA) ? And why?

Q2: Why C# (also Java) resources are too low ?

My opinion: It seems like that java is more developed than c# in rage , I think resources are not good enough to learn completely.

Edited by taktaz208

Share this post


Link to post
Share on other sites

Javascript, not Java.
Both are equally reliable to use, use whatever one you're more knowledgable with. There's no advantage or disadvantage to using either one.

Why are resources low? Maybe not enough people have time to develop resources to share for everyone. This isn't something that can be answered by one person, how would we know? We also don't know your standards of 'low resources'. This is purely subjective and again, cannot just be answered by someone.

Lucky that resources aren't the only reference to learn! You also have the wiki!! you use that to learn about the API as well! That should be plenty enough to learn.

Share this post


Link to post
Share on other sites

Java because c# enums use too much of my ram on Android. But Java Node has bad garbage collector I hear............ wonder if memory leak...

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, notsosmart said:

Java because c# enums use too much of my ram on Android. But Java Node has bad garbage collector I hear............ wonder if memory leak...

First, there is no Java node, only nodejs which stands for javascript and not java. Also, trust me, if you don't make the difference between java and javascript, the memory leaks that happens is because you are very bad at programming, not because of the language used. Also, android is based on Java SDK, that's why you get better performance using java, because if you use C# on android, there will be actually a framework based in java that translates that C# api calls into java api calls, so basically you're writing c# but your software is still run by java sdk through a translation layer which only decreases performance. You can't compare C# on PC with Java on Android. When using a programming language it really depends for what platform are you developing, how does that platform handles that programming language and sometimes the OS.

On android you gonna get the most performance by coding a direct Java app, cause that's what it's made for. On iOs you gonna get the most performance by coding in Swift.

C# used to be a windows thing, but now with Net Core you can compile it for linux too.

So now it only comes to the framework which you are developing for, in this case being RAGE, which is optimised as good on javascript as it is on C#. You can get RAGE to recognize java but you have to make your own java bridge (i think there was one available but you're gonna need to keep it up to date because i'm not sure it is and that is has all of the functionalities that rage supports). The best way is to stay with one that it's already supported, so either javascript or C# (or C++ if you like challenging your life). In this case it comes only to personal preference and past experience. If you have experience working with js/nodejs etc. then go with javascript. If you have experience with C#/Java or any other object oriented programming language then I think you'd rather choose C#.

Edited by robearded

Share this post


Link to post
Share on other sites
2 hours ago, robearded said:

First, there is no Java node, only nodejs which stands for javascript and not java. Also, trust me, if you don't make the difference between java and javascript, the memory leaks that happens is because you are very bad at programming, not because of the language used. Also, android is based on Java SDK, that's why you get better performance using java, because if you use C# on android, there will be actually a framework based in java that translates that C# api calls into java api calls, so basically you're writing c# but your software is still run by java sdk through a translation layer which only decreases performance. You can't compare C# on PC with Java on Android. When using a programming language it really depends for what platform are you developing, how does that platform handles that programming language and sometimes the OS.

On android you gonna get the most performance by coding a direct Java app, cause that's what it's made for. On iOs you gonna get the most performance by coding in Swift.

C# used to be a windows thing, but now with Net Core you can compile it for linux too.

So now it only comes to the framework which you are developing for, in this case being RAGE, which is optimised as good on javascript as it is on C#. You can get RAGE to recognize java but you have to make your own java bridge (i think there was one available but you're gonna need to keep it up to date because i'm not sure it is and that is has all of the functionalities that rage supports). The best way is to stay with one that it's already supported, so either javascript or C# (or C++ if you like challenging your life). In this case it comes only to personal preference and past experience. If you have experience working with js/nodejs etc. then go with javascript. If you have experience with C#/Java or any other object oriented programming language then I think you'd rather choose C#.

I have made scalable code all my life. I just use try catch on my script to fix memory leak from Java Node since the Python server interpreting it has a malformed malloc! 

Share this post


Link to post
Share on other sites
Posted (edited)
15 hours ago, notsosmart said:

I have made scalable code all my life. I just use try catch on my script to fix memory leak from Java Node since the Python server interpreting it has a malformed malloc! 

Are you talking about java or nodejs? If you're using try and catch statements i guess you're using java (there is no official java api for rage.mp tho) but saying java node you're making me thinking you're talking about nodejs which uses javascript and not java.

Also what does python has to do with this?

Edited by robearded

Share this post


Link to post
Share on other sites
On 3/30/2019 at 10:17 AM, robearded said:

Are you talking about java or nodejs? If you're using try and catch statements i guess you're using java (there is no official java api for rage.mp tho) but saying java node you're making me thinking you're talking about nodejs which uses javascript and not java.

Also what does python has to do with this?

I'm just messing with you.

  • Like 1
  • Mask 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.