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: What is your favorite concatenation operator?

Previous Thread :: Next Thread 
GetTheJobDoneALT is not online. GetTheJobDoneALT
Joined: 25 Apr 2016
Total Posts: 258
01 May 2016 11:56 PM
I dislike PHP's . and Lua's ..

I like the simple standard +




Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
02 May 2016 04:09 AM
My least favourite is defiantly JS.

var Text1 = "Hello "
var Text2 = "World"
var End = Text1.concat(Text2)

console.log(End)

>Hello World


That seems stupid to me. Lua's .. is probably my favourite as I learnt it first. IDK PHP so I can't comment, however I don't like the plus sign either. But I've only ever seen it in Swift and C#
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
02 May 2016 05:01 AM
You could use + in JS dude.
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
02 May 2016 05:37 AM
You're right. I've only ever used JS to do the CodeCademy course. In terms of actual use, I've only ever use Lua, Swift and limited (Very limited) amounts of C#
Report Abuse
RightLegRed is not online. RightLegRed
Joined: 02 Oct 2009
Total Posts: 6761
02 May 2016 06:57 AM
I believe this to be a double edged sword. The + operator is the most common concatenation operator used across languages (that I've seen, personal anecdote here). But does it make as much sense to use + for both concatenation and addition?

Personally I like the split with a seperate operator for each, as working out the order of operations when doing arithmatic and adding to a string in a single line is a bother.

I mean, it's a very rare case which you would find issues with this (mainly when debugging sums etc.) but I still believe seperate operators is best. Unfortunately I always default to trying to just use + all the time still
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
02 May 2016 08:18 AM
Probably ..
Not because it's attractive, just force of habit lol


-=Robo=-
Report Abuse
GetTheJobDoneALT is not online. GetTheJobDoneALT
Joined: 25 Apr 2016
Total Posts: 258
02 May 2016 03:35 PM
Fair points - but I hope everyone can agree ".." is better than "." and considerably so.


Report Abuse
RightLegRed is not online. RightLegRed
Joined: 02 Oct 2009
Total Posts: 6761
02 May 2016 04:49 PM
I think you're missing the point of preference
Report Abuse
ExtremeBuilder15 is not online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
02 May 2016 04:54 PM
To me .. just seems cleaner than . or +
Report Abuse
GetTheJobDoneALT is not online. GetTheJobDoneALT
Joined: 25 Apr 2016
Total Posts: 258
02 May 2016 04:56 PM
@RightLegRed

.. is much more visible than . tho


Report Abuse
RightLegRed is not online. RightLegRed
Joined: 02 Oct 2009
Total Posts: 6761
02 May 2016 05:17 PM
Right, and I agree with you! But that is our preference, and does not reflect fact. Something like this cannot really be quanitifed to which idea is better because they can be argued from both sides sufficiently.

It is similar to arguments about case, brace spacing (to newline, or not to newline?) and variable naming conventions. Like you can say it's more visible, but someone could say why use 2 symbols to reflect one operation? Etc. Etc.
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
03 May 2016 04:17 AM
Also . looks like you're going workspace.part


WolfgangVonPrinz for President!
Report Abuse
DarthStrantax is not online. DarthStrantax
Joined: 31 May 2011
Total Posts: 2610
03 May 2016 04:40 AM
Right that is your opinion keep it to yourself.
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
03 May 2016 07:17 AM
>Is asked for opinion
>Gives opinion
>NOOOOOOB


WolfgangVonPrinz for President!
Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
03 May 2016 07:21 AM
php's . is best but obviously not suitable for Lua and object-oriented languages that use it to access children, properties and sub classes.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
03 May 2016 07:27 AM
I am fine with anything that isn't already an operator in the language. I disapprove of languages that use +.


Report Abuse
KapKing47 is not online. KapKing47
Joined: 09 Sep 2012
Total Posts: 5522
03 May 2016 09:36 AM
I personally prefer using ',' as it looks somewhat cool, but most times I need to do concatenation in tricky situations so I use '..' instead.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
03 May 2016 10:52 AM
+ is a terrible concatenation operator. Thats suppose to be a plus sign not an operator for strings. ".." makes much more sense. Javascript is horrible for that.

What i also find an annoying difference btween javascript and lua is that table values in js are indexed by a 0 first instead of a 1 in lua. such a pain..


Report Abuse
LockFocus is not online. LockFocus
Joined: 31 Aug 2013
Total Posts: 1044
03 May 2016 10:54 AM
I personally like Lua's "..". It's simple and easy to use
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
03 May 2016 10:58 AM
VBS & 😂

- The [Guy]
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