generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: += Petition!

Previous Thread :: Next Thread 
FreshPrinceOfValues is not online. FreshPrinceOfValues
Joined: 01 Feb 2015
Total Posts: 1042
10 Apr 2016 05:24 PM
This petition is to have ROBLOX implement the "+=" operator, as well as the "-=", "*=", and "/=" operators.

The += function is for setting the value of a value. So basically instead of having to type out "script.Parent.Value = script.Parent.Value + 1", we can type out "script.Parent.Value += 1" and its the same with "-=", "*=", and "/="

This would make things much easier for scripting!


It's simple physics R$48
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
10 Apr 2016 05:25 PM
That's not something they can add. It would have to be something the lua developers add, and even then I don't think it's possible due to the way lua works.
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
10 Apr 2016 05:27 PM
pretty sure it would have been put in already if it was possible, you're not exactly the first person to ask for this.

but sure, this would be nice if it could be done.
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
10 Apr 2016 05:38 PM
Possible to add but it wasn't added in for a reason.
Report Abuse
FreshPrinceOfValues is not online. FreshPrinceOfValues
Joined: 01 Feb 2015
Total Posts: 1042
10 Apr 2016 06:38 PM
what was the reason?

I just request it because I code in java too and its a nice feature


It's simple physics R$48
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
10 Apr 2016 06:46 PM
Lua doesn't use += so

¯\_(ツ)_/¯
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
10 Apr 2016 08:39 PM
Probably because it's too much bloat for a language that's meant to be tiny
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
10 Apr 2016 08:46 PM
Regardless of why we don't have it, why do we need it?

Being too lazy to do
x = x+1
Isn't a good enough reason.


If we are to assume that the interpreter doesn't optimize x=x+1, then you're saying you're doing something soo performance heavy that +=, -=, and the like will make a difference. If you're doing something where this optimization is required, you're doing it wrong or shouldn't be doing it in an interpreted language to begin with.
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
10 Apr 2016 08:55 PM
x = x + 1 cant be optimized in Lua, and x += 1 will produce the same exact instruction as x = x + 1. It's purely bloat, the way I see it: Lua is meant to be compact, adding 5-10 more operators bloat the compiler for no actual benefit. In other languages, += can typically lead to more optimized code (assuming optimizations don't do that already) but not in Lua (if those operators did exist). It's a waste.

+=,-=,*=,/=,%= is just the start, in Lua 5.3 they'll need even more (new operators) and people will no doubt also want ++,-- unart operators, then they'll want the true ternary operator then they'll want multiple assignments in a statement and suddenly you have a 3x bigger language.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
10 Apr 2016 08:57 PM
+= looks ugly as f. thats why it shouldnt be added


Report Abuse
TIV67 is not online. TIV67
Joined: 05 Mar 2014
Total Posts: 630
10 Apr 2016 08:59 PM
no. i hate everything that has to do with java with a passion


Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
10 Apr 2016 09:48 PM
"no. i hate everything that has to do with java with a passion"
Because += is certainly Java.


Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
10 Apr 2016 09:49 PM
op mentioned += was from java
that was my other account, i forgot to log off
and i know += is an operator in other languages, but that operator looks ugly as frick.



Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
10 Apr 2016 09:51 PM
Oh, I didn't see that. My bad.


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image