Raildex
|
  |
| Joined: 06 Dec 2009 |
| Total Posts: 934 |
|
|
| 19 Jan 2017 12:43 PM |
| is there any benefits to using one over the other? |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 12:44 PM |
workspace saves you 5 characters
NOW GATHER, UNDER THE NAME OF TEAM ROCKET! |
|
|
| Report Abuse |
|
|
12904
|
  |
| Joined: 29 Oct 2012 |
| Total Posts: 441 |
|
| |
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
|
| 19 Jan 2017 03:08 PM |
This is a genuine question. ROBLOX discourages the use of Instance.new("Thing",parent) in favor of setting the parent directly, for it is more costly to drop it right away into the parent. Seems like it's just a shortcut, right? But indeed there is more to it than just 'saving' a few characters.
Perhaps there is some hidden background of which we are unaware O.o |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:09 PM |
| game.Workspace looks better and is good etiquette. |
|
|
| Report Abuse |
|
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
|
| 19 Jan 2017 03:15 PM |
| Agreed, it's better form imho. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:20 PM |
| workspace is a built-in keyword... why not use it? |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:21 PM |
| The look of a script is very important to me. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:22 PM |
so you'll use cosmetics over efficiency? i'd like to see one of your scripts |
|
|
| Report Abuse |
|
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
|
| 19 Jan 2017 03:23 PM |
| After some experiments there appears to be no more than a 1/10000th of a second's delay when the server accesses workspace as opposed to game.Workspace. |
|
|
| Report Abuse |
|
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
|
| 19 Jan 2017 03:25 PM |
@Un
That's not fair. Choosing game.Workspace is not "valuing cosmetics over efficiency," this is hardly an inefficient practice as much as it is a slightly inconvenient habit. The way a script appears is important, and in the vast majority of cases one can write a perfectly well-formatted script without sacrificing any degree of efficiency. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:27 PM |
are you serious? did i ever say that? the way he said it implied that he cares more about how his scripts look rather than how efficient they are using the workspace keyword isn't inefficient at all, i really hope you weren't being serious when you made that reply |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:28 PM |
Function > Efficiency > Looks But, they are all very important, and I do my best with scripts. |
|
|
| Report Abuse |
|
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
|
| 19 Jan 2017 03:32 PM |
take a chill pill their un, I'm not trying to be hostile.
I hardly think saying "the way a script looks matters to me," or something like that, carries the implication that this person cares more about indentations than script structure. All I'm saying is that you were putting some words in his mouth, that's all. And your previous remark supports this.
And yes, I was being completely serious. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:33 PM |
"cares more about indentations than script structure" i didn't say anything like that lol when he says that looks mean a lot to him that means to me like he'll sacrifice efficiency for it
and it's really hard to believe you were being serious when you said "After some experiments there appears to be no more than a 1/10000th of a second's delay when the server accesses workspace as opposed to game.Workspace." |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:35 PM |
| The looks of a script is extremely important. I will make my scripts as efficient as possible, while still keeping it looking good. If I ever release a script, it should be easily readable to everyone. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:36 PM |
that clears things up then i'm still confused why you called using game.Workspace good etiquette though |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:37 PM |
| It just... Is..? I don't know why, but it just looks a lot better. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:38 PM |
so basically you're telling OP that referencing Workspace by using game.Workspace is good etiquette because it's your opinion that it's more visually appealing?
🤔 |
|
|
| Report Abuse |
|
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
|
| 19 Jan 2017 03:40 PM |
I was. I ran two simple, functionally identical functions, one which referenced workspace, the other game.Workspace, and measured how long it took server to run these (nearly) identical functions. I scaled up the time to ensure accuracy, and found the differences to be less than 1/10000, measured in seconds, margin of error accounted for.
And I'm not really going to argue with you about your phrasing of your criticism, you don't really seem receptive to my objections. Anyway idk what value a protracted phrasing argument would add to this discussion. |
|
|
| Report Abuse |
|
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
|
| 19 Jan 2017 03:41 PM |
| game.Workspace looks more professional, idk. It's a feeling, an opinion, not a wiki article. |
|
|
| Report Abuse |
|
|
Eventive
|
  |
| Joined: 28 Jul 2011 |
| Total Posts: 9827 |
|
|
| 19 Jan 2017 03:43 PM |
No difference, but I use game.Workspace because for me it's weird seeing just Workspace.Part rather than game.Workspace.Part
ATR'er since 2013. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:43 PM |
| mani show me the code you ran that resulted in that negligible difference |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:43 PM |
| No, if there are "efficiency benefits" to using one more than the other they're more than negligible and ###### ## ##### if you care about them. Use whatever looks nicer to your eyes. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 03:44 PM |
Nice filter.
If there are "efficiency" benefits to using one over the other, they're negligible enough that let's just say you're a little less than smart, perhaps not smart at all, if you care about those benefits. |
|
|
| Report Abuse |
|
|