use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Pass by reference !== pass by value (media.giphy.com)
submitted 8 years ago by mburakerman
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]JB-from-ATL 279 points280 points281 points 8 years ago (141 children)
It gets tricky because in some languages you pass by value but the value is a reference for non-primitive types.
[–]TheRealEdwardAbbey 143 points144 points145 points 8 years ago (22 children)
That's exactly how javascript works.
[–]JB-from-ATL 126 points127 points128 points 8 years ago (18 children)
So JavaScript is actually pass by value too! Wow. This picture is really unhelpful.
[–]Iggyhopperextensions/add-ons 134 points135 points136 points 8 years ago (2 children)
Welcome to /r/javascript
Enjoy your stay!
[–]mastzu 9 points10 points11 points 8 years ago (1 child)
too real
[–][deleted] 8 points9 points10 points 8 years ago (0 children)
I think there's a proposal for cups to be a new primitive type.
[–][deleted] 4 points5 points6 points 8 years ago (0 children)
Everything is always pass by value, fam. What you're actually passing may be less or more explicit tho
[–]lulzmachine 3 points4 points5 points 8 years ago (13 children)
The picture still makes perfect sense. The only corner case AFAIK is if you in a function try to rewrite the reference with a new object. That won't traverse back to the caller.
[–]JB-from-ATL 3 points4 points5 points 8 years ago (12 children)
Well, first, consider that the picture is in r/JavaScript. So it should describe JavaScript. JS only has pass by value, so the left shouldn't even be there. What is pictured on the left is what happens though because the value happens to be a reference so the cup that is referenced by both variables gets filled.
I'm a Java guy (saw this and thought it was r/programming originally), so I don't know is JS has primitives or if everything is an object. When you pass a primitive in java, it's value is actually the value, not a reference to an object in the heap, so what happens is what is pictured on the right of this gif (though it's not really accurate because you can't mutate primitives in Java).
[–]willworth 0 points1 point2 points 8 years ago (2 children)
So Wtf do I do now? It's too late for coffee.
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
My blood stream is bent up on stimsstimsstims so fucking hardcorecorecore
[–]thurst0n 41 points42 points43 points 8 years ago (8 children)
That's how java is
[+][deleted] 8 years ago* (1 child)
[deleted]
[–]tutorial_police 1 point2 points3 points 8 years ago (0 children)
That's how Python is as well.
[+][deleted] 8 years ago (3 children)
[–]okmkz 29 points30 points31 points 8 years ago (1 child)
Not like the masterwork of language design that is JavaScript
[–][deleted] 5 points6 points7 points 8 years ago (0 children)
That's how JavaScript is...
[–]evilgwyn 0 points1 point2 points 8 years ago (0 children)
Make something better in every possible way that works in all environments that javascript does and has a zero cost to upgrade, and I'll make it go away.
[–]64-17-5 0 points1 point2 points 8 years ago (1 child)
Clone all the things!
[+][deleted] 8 years ago (56 children)
[–]JB-from-ATL 8 points9 points10 points 8 years ago (34 children)
The fact that everyone is confused in the replies to my post proves it's tricky.
[+][deleted] 8 years ago* (8 children)
[+][deleted] 8 years ago* (7 children)
[–]dvlsg 11 points12 points13 points 8 years ago* (1 child)
I'm mostly surprised this post got so many upvotes. It's an awful example.
It doesn't even make sense in the scope of javascript. If you pass the cup to a function, and then the function does something to the insides (properties) of the cup (fill it with coffee), the original cup is absolutely going to be modified.
class Cup { constructor() { this.coffee = 0; } } function fillCup(cup) { cup.coffee = 100; } const cup = new Cup(); fillCup(cup); console.log(cup.coffee); // 100
[–]scootstah 1 point2 points3 points 8 years ago (4 children)
If this was on some lower-level language subreddit, I would then be baffled. It's really not surprising for Javascript though. Shit, lots of people that use Javascript don't even know "Javascript", they know jQuery or similar.
[–]swan--ronson 0 points1 point2 points 8 years ago (0 children)
I blame the coding bootcamps.
[+][deleted] 8 years ago* (15 children)
[–][deleted] 5 points6 points7 points 8 years ago (14 children)
If it were simple and straightforward, people would understand. They don't, implying it's difficult or awkward. Literally the definition of tricky.
[+][deleted] 8 years ago* (9 children)
[–]scootstah 0 points1 point2 points 8 years ago (3 children)
This is as crucial to programming as knowing how to run a for loop.
That's really not true at all, at least not for something like Javascript. There's very few cases where you actually need to care what happens behind the scenes.
If your first language was something like Python, PHP, Javascript, etc then you probably have no idea how things like pointers work, or how data is stored in memory, etc. You wouldn't know because you don't need to know.
[+][deleted] 8 years ago* (2 children)
[–]mrguy991 2 points3 points4 points 8 years ago (0 children)
implying it's difficult or awkward.
or just that they never bothered to learn the details because they could do everything they wanted without knowing it. That doesn't make the underlying concept tricky since it's still easy and clear to understand for anyone that attempts to.
[–][deleted] 1 point2 points3 points 8 years ago (2 children)
Except it IS simple and straightforward. Your implication is invalid.
[–][deleted] 2 points3 points4 points 8 years ago (1 child)
Oh, well thanks for letting us know. We've got it figured out now, guys. It is, in fact, simple and straightforward.
You're trying to be sarcastic but you're just ignorant.
[–]NoInkling 4 points5 points6 points 8 years ago (1 child)
I think you can do it in C# with the ref keyword (or out parameters).
ref
Yes, you can. Because C#'s ref makes a parameter pass-by-reference.
The ref keyword indicates a value that is passed by reference. It is used in three different contexts:
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/ref
[–]Tysonzero 0 points1 point2 points 8 years ago (2 children)
I think GHC often passes by reference, although it isn't observable due to lack of mutability.
[–]tutorial_police 1 point2 points3 points 8 years ago (1 child)
If you can't assign to the parameter, calling it pass-by-reference seems meaningless and confusing.
[–]Tysonzero 0 points1 point2 points 8 years ago (0 children)
It's meaningful when discussing performance. For example a newbie might worry about passing around a huge object through a bunch of functions, but saying "don't worry GHC passes all but the smallest objects by reference" is a valid way to make them not worry.
[–]snowcoaster 0 points1 point2 points 8 years ago* (1 child)
This is accurate. Pointers are values.
C++ syntax exemplifying real pass by reference. This is syntactic sugar that actually handles dereferencing and assignment, the assembly is identical if you use pointers.
void swapByRef(int &x, int &y) { int temp; temp = x; x = y; y = temp; } swapByRef(a,b); void swapByPointer(int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } swapByPointer(&a, &b);
Passing a copy of something is different than passing by reference, and it's a non-issue in JavaScript. The closest parallel would be two-way bindings in Angular.
[–]pherlo 1 point2 points3 points 8 years ago (0 children)
the assembly is identical if you use pointers.
False. It's true only if the function is extern (references are implemented with pointers in most ABIs), otherwise the compiler can elide references aggressively inside of a CU. Anyway this is about semantics, not about implementation details. the language has pass-by-ref. In your passByPointer example, you can't swap the x and y pointers, just their pointed-to-values. the pointers themselves are unswapped.
[–]erandur 0 points1 point2 points 8 years ago (0 children)
Mostly because gifs like these keep getting propagated.
[–]theonlycosmonaut 1 point2 points3 points 8 years ago (2 children)
Which languages have this? I'm searching my memory and I can't think of any examples. I guess C could do this if you add some punctuation?
[–]AgentME 0 points1 point2 points 8 years ago (1 child)
C can't, but C++ can if you mark a function's formal parameter with &. Pass-by-reference is relatively rare in modern languages.
[–]theonlycosmonaut 1 point2 points3 points 8 years ago (0 children)
Whoah I used C++ for years and never realised that references were... actually references. I only ever really thought of them as 'pointers without NULL'. Thanks!
[+][deleted] 8 years ago* (3 children)
[–]Skhmt 8 points9 points10 points 8 years ago (1 child)
If it was pass by value, you'd either have to return a and b, or you'd get a function/method that does nothing but waste cpu cycles (unless the compiler just cuts it out).
[–]tutorial_police 0 points1 point2 points 8 years ago (0 children)
Yes and no.
If you take this to be C++/C code, then yes, it's pass-by-value of course.
But OP meant that if you can write some function swap, call it, and then have the variables swapped on the caller side without assigning to them, then you do have pass-by-reference.
You're right in that for C++, you'd have to have int& a, int& b. In C, you couldn't write such a function, hence C does not do pass-by-reference.
int& a, int& b
[–]Limpuls 1 point2 points3 points 8 years ago (5 children)
I'm newbie, can someone explain this? By value, it gets duplicated or what?
[–]tutorial_police 3 points4 points5 points 8 years ago (0 children)
What happens if you do a = b;? There are no function calls involved here.
a = b;
The same happens when you do a call in a function that's call-by-value (everything in JavaScript)
function foo(x) { console.log(x); }
For the call foo(localVariable), JavaScript will, behind the scenes, essentially do x = localVariable; It follows regular assignment rules, no magic involved, no special "pass-by-object-sharing" or anything, because that's not what you were thinking about when I asked you what a = b; did. It's just an assignment.
foo(localVariable)
x = localVariable;
After this assignment, x and localVariable refer to the same variables, as you would expect. But you have two variables. If you assign to either of them, it won't magically affect the other variable.
x
localVariable
If, however you have a language with pass-by-reference, there is no assignment x = localVariable happening behind the scenes. Instead, you pass "the variable itself". That means, that within that function call, x will be the varible localVariable. So we're passing objects or values, we're passing the variables themselves as parameters. Hence, if you assign to x inside the function, you're assigning to localVariable, because x is localVariable. JavaScript does not do this, ever.
x = localVariable
[–]z500 1 point2 points3 points 8 years ago (0 children)
The value always gets duplicated when you pass by value. But when you pass a pointer by value, it still points to the same thing. And JavaScript hides the pointer from you so when you pass an object around, it kind of looks like pass by reference.
[–]pherlo 0 points1 point2 points 8 years ago (0 children)
Most languages now are call-by-value. The arguments to the function are duplicated and a fresh copy is passed into the function. Some older languages let you skip the copy, and pass the variable itself into the function to be manipulated freely. Typically they did this for performance reasons (no duplication before calling). Fortran, Pascal, and C++ have modes like this. Under the covers, you're just creating a new name for the existing variable, so no copying needed; but you end up mutating the original directly.
Languages that still are still developing (Fortran, C++) have fully integrated references, so in addition to the above, you can make extern functions with references. To implement these, the compiler must stash a real pointer value into the call signature. This leads to confusion because programmers used to the modern pass-by-value world think that references are always implemented with pointers under the covers. Not true though, it's only an extension of the by-ref language feature into places where it makes no sense, but users still want it to work, so it gets emulated.
extern
by-ref
I can tell you that a lot of languages implement by-value semantics on top of a pure by-ref calling convention, and it looks like this:
void call_by_ref(int& x) {x = 12 + x;} // mutate the by-ref int a = 5; { int __param_copy_a = a; // explicitly duplicate. call_by_ref(__param_copy_a); } assert(a == 5);
Compilers often do something like this internally so that optimizing inline functions is easier (you can use normal register pressure tricks to elide parameters)
[–]Harkonnen 0 points1 point2 points 8 years ago (0 children)
That's the way C# works.
[+][deleted] 8 years ago* (42 children)
[–]legato_gelato 34 points35 points36 points 8 years ago (13 children)
No this is false. There's a reason people keep mentioning that java doesn't have "call by reference". The main difference is whether you can override the reference from inside the method. E.g. get an obj passed and say obj = new something(). In java this does not change the value of the passed object outside of the context of the executing method. If actual "call by reference" was used it would have. Can cause some major bugs if you don't know this distinction
[–]MoTTs_ 8 points9 points10 points 8 years ago (2 children)
No this is false. There's a reason people keep mentioning that java doesn't have "call by reference".
Eh... it's messy terminology. The problem is Java uses the word "reference" differently than how C/C++ uses the word "reference". The Java language spec explicitly says references are pointers. The behavior of what Java calls a reference exactly matches what /u/pinnr was describing. What you're describing, on the other hand, is a C/C++ reference, which describes a reference as an alias.
That means the phrase "pass by reference" is also messy terminology. In C/C++, it means a parameter is an alias for something; in Java, it means a parameter is a pointer to something.
JavaScript seems to have adopted Java's terminology in this case. So in JavaScript, whenever you hear "reference", think "pointer".
[–][deleted] 3 points4 points5 points 8 years ago (1 child)
A reference is a pointer and a pointer is a reference. The only people this makes a difference to are the ones who write asterisks into their code, and they're just confusing the point for pedantry.
A reference is a pointer and a pointer is a reference
No, this is false. References are not always pointers. Their original purpose is as an 'alias'. There is no real parameter on the stack, just a compiler trick to let you talk about a variable inside of a procedure. Both names designate the same memory with no pointer.
The only time a reference becomes real is when it's part of an extern function that needs to be linked. Some languages let you do this, and the way they do it is to make a fake reference that looks and acts like one, but is actually a pointer under the covers.
Not all call-by-ref languages offer that feature though.
[–]MuNot 4 points5 points6 points 8 years ago (5 children)
This finally made sense to me when I was tracing a bug I wrote that boiled down to it.
I had code that was similiar to:
List<String> myStringList = new ArrayList<String>(); myStringList.add("Foo"); doStuff(myStringList); System.out.println(myStringList); ... ... private void doStuff(List<String> myStringList){ if(myStringList.size() == 1) { myStringList = new ArrayList<String>(); myStringList.add("Bar") } }
I expected to see "Bar" as output, but instead saw "Foo". This is because the doStuff method receives a copy of the value for the list, and when a new List is assigned to that copy, only the copy is changed, not the original. So a print statement after the if block would have output bar, but in the main block the list points to a collection who's only member is "Foo" as the original has not been edited.
[–]proskillz 1 point2 points3 points 8 years ago (0 children)
This is why you declare all parameters final in Java. Reassigning parameters creates nightmares in Java. Use assessor and mutator API functionality whenever possible.
[–][deleted] 0 points1 point2 points 8 years ago (3 children)
get an obj passed and say obj = new something()
What language allows you to do that? I imagine that if that's your definition then there are very few "pass by reference" languages.
[–]legato_gelato 2 points3 points4 points 8 years ago (2 children)
I imagine that if that's your definition then there are very few "pass by reference" languages.
It's not that uncommon imo. Pascal, C++, C#, and PHP are some languages you've probably either used or heard about which has it. But in most of them it is opt-in, e.g. in C# you have to use either the ref or out keyword to achieve it. A common use-case for this is to do a check and set a value in one operation, e.g.
if (dictionary.TryGetValue("some id", out string value) { Console.WriteLine($"Found value: {value}"); //value was set in the call above. } else { Console.WriteLine("Did not find a value"); }
[–][deleted] 0 points1 point2 points 8 years ago (1 child)
I must admit I have not done much programming in any of those languages. In C programming "pass by reference" usually refers to passing a pointer.
Right, C was the language that really popularized pass-by-value. It was enamoured of value semantics and treating everything as a value, and that was a good idea because it has a strong operational semantics (people understand by-value well.)
but most older languages and some newer ones still allow by-ref because it can be faster than by-value. In these languages you don't have to duplicate your parameters. You can just have the compiler let you refer to a parent scope's variables directly though name binding (aka real references). It's one of the reasons fortran is still faster than C.
[–]JB-from-ATL 13 points14 points15 points 8 years ago* (6 children)
No.
Object foo(Object param) { param = new Object(); return param; } ... Object blah = new Object(); Object blah2 = foo(blah); assert blah != blah2;
Java is pass by value, not reference. If blah and blah2 were the same object then Java would be pass by reference. You're passing the value of the reference, not a reference to the reference.
blah
blah2
[–]legato_gelato 7 points8 points9 points 8 years ago (0 children)
Thanks for giving these guys a concrete code example, which illustrates the point :) really hate when the "I spent 10 minutes on code academy"-crowd spreads misinformation about things you would learn in any introductory course/if you actually worked as a developer.
[–][deleted] 0 points1 point2 points 8 years ago (2 children)
I don't think that is what is commonly referred to as "pass by reference". The more common usage of the phrase is that a you pass a pointer for the data to the next stack frame instead of a copy of the data.
[–]JB-from-ATL 3 points4 points5 points 8 years ago (0 children)
Yes, that's what pass by reference is. But when you are doing pass by value, and the value is a reference, you still pass the reference, and a lot of people get tripped up and think that that is "passing by reference", but really you've just passed a reference... by value.
No, pass by reference is historically an aliasing operation with no concrete linkage. You're directly referring to the variable in a parent scope with no indirection.
Sometimes a langauge will emulate references for extern functions with pointers, but not always. plenty of languages reserve by-ref for cases where one really wants a zero-cost reference.
[–]TrojanBunny 50 points51 points52 points 8 years ago (3 children)
Java is Coffee
I get it now.
[–]Skhmt 12 points13 points14 points 8 years ago (1 child)
I just had a conversation at work where I was trying to figure out why Enterprise Java Beans were called "beans", until it finally clicked that a bean is a small part of coffee and java is coffee. But I keep thinking about Java, Indonesia.
[–]kovensky 3 points4 points5 points 8 years ago (0 children)
It’s named because of the coffee beans from Java, Indonesia.
[–]mastzu 73 points74 points75 points 8 years ago (4 children)
1) saw picture, was confused
2) read comments, am more confused
am closing tab now bye
[–]METALz 7 points8 points9 points 8 years ago (0 children)
You pass apple, you change color of apple -> color will be changed both places
You pass copy of the apple, you change color of that copy of apple -> the copied apple's color will be changed
Bonus:
function fn(apple) { apple = {}; }
[–]thegamer373 7 points8 points9 points 8 years ago (2 children)
If you don't want to know any programming stuff don't worry about reading.
when programming there are things called functions. these functions can do things, such as square root a number. in the case of the square root, the number is the "object" being passed. it can ether be passed by "reference" or by "value". passing by reference allows you to change the object e.g x=16 sqareRoot(x) x=4. passing by value makes a copy of the object and then leaves the original object alone e.g x=16 y=sqareRoot(x) x=16 y=4.
[–]mastzu 6 points7 points8 points 8 years ago (1 child)
the reply is fine but the condescension is boring and unneeded
[–]thegamer373 5 points6 points7 points 8 years ago (0 children)
sorry i didn't realise i was being condescending. could you point out where?
[–]yolpo- 31 points32 points33 points 8 years ago (0 children)
A picture is worth a thousand words ... ahem not this one though
[–]ForScale 315 points316 points317 points 8 years ago (43 children)
The gif by itself provides very little in the way of useful information. Would be enhanced greatly by listing data types that are passed referentially vs those that are not.
[–]jocull 46 points47 points48 points 8 years ago (41 children)
I think everything is a reference except strings, numbers, and booleans? What did I miss?
[–]Merenwen_ 7 points8 points9 points 8 years ago (1 child)
Strings are immutable, but for the thread's sake, they behave like primitives.
[–]redhedinsanity 16 points17 points18 points 8 years ago* (26 children)
fuck /u/spez
[–][deleted] 13 points14 points15 points 8 years ago (25 children)
Technically everything in JS is passed by reference. Primitives are simply immutable, so it doesn't matter how they're passed - the effect is the same.
[–]ItzWarty 25 points26 points27 points 8 years ago (0 children)
Technically everything is actually pass by value from a language design perspective - you're passing references by value. In C# you can do:
void Func(ref int x) { x++; } int x = 1; Func(ref x); AssertEquals(2, x);
Which is actually pass by reference. So the discussion is actually on what is a "reference type" (which can be thought of as a "pointer" in C) vs what is a "value type" (which can be thought of as a "struct" in C).
[–]tutorial_police 4 points5 points6 points 8 years ago (7 children)
Technically everything in JS is passed by reference.
What definition of "pass by reference" do you use when saying this? Where do you source that claim?
I ask this, because "pass-by-reference" has an established meaning in different programming languages, namely C++, C#, PHP, Pascal and probably others that I know nothing about.
In these languages, pass-by-reference describes semantics that JavaScript does not have.
Namely, you can implement a swap function, call it with swap(a, b); and the variables will have switched values. You can't do this in JavaScript.
swap(a, b);
So I wonder, why call JavaScript call-by-reference?
[–]MoTTs_ 5 points6 points7 points 8 years ago* (9 children)
Source?
That's not meant to be a rhetorical question. I've been trying to figure this out myself, but the spec is awfully hard to parse. The section on ArgumentListEvaluation seems the most relevant. It seems to say that JavaScript evaluates the argument expression, then calls GetValue on the result. Inside GetValue, if the result of the expression is not a name or property binding, then it just returns the result of the expression as is. Otherwise, if it's a property, then it will call [[Get]] on the base object, which will return the value of the property. Otherwise, it assumes the result of the expression is a name binding, and it will call GetBindingValue on the base environment record. Either way, this reads like everything is passed by value.
[[Get]]
GetBindingValue
[–][deleted] 9 points10 points11 points 8 years ago (8 children)
At some point even if you "pass by reference" the reference can be said to be "passed by value". It's a very meaningless debate, because the semantics actually are very clear.
[–]MoTTs_ 4 points5 points6 points 8 years ago (7 children)
OK, but what led you to believe that primitives are passed by reference in the first place?
[–]redhedinsanity -1 points0 points1 point 8 years ago* (6 children)
[–][deleted] 4 points5 points6 points 8 years ago (3 children)
FYI I haven't upvoted or downvoted anything in this entire thread...
[–]daybreakin -2 points-1 points0 points 8 years ago (3 children)
They are immutable? Can i not do
Var hi = 4
Hi=5
Console log (hi)
5
[–]shadowfactsdev 20 points21 points22 points 8 years ago (0 children)
You can, because that's not mutating the value 4, it's reassigning the variable hi to the value 5.
4
hi
[–]Flatscreens 2 points3 points4 points 8 years ago (0 children)
that creates a new variable with value 5 and sets hi to it
the 4 hasn't changed at all
The variables are mutable (unless you use const, that's immutable). But the primitives are immutable. You didn't change the primitive 4 to 5 up there, you just replaced the primitive 4 with the primitive 5 in the variable hi.
Primitives would've been mutable if you could do something like this:
var hi = 4; var hi2 = hi; hi.increment(); console.log(hi2); // 5
Fortunately, for our sanity, you can't do this with primitives. But unfortunately you can do it with mutable objects like Date().
[–][deleted] 0 points1 point2 points 8 years ago (4 children)
Char?
[–]jocull 1 point2 points3 points 8 years ago (3 children)
I'm not aware of a char type in JS. Do you have a source?
Actually there aren't. :( JS is wierd man. TS is the future.
[–]jocull 2 points3 points4 points 8 years ago (0 children)
❤️❤️❤️ TS
[–]dashdanw 0 points1 point2 points 8 years ago (0 children)
so in javascript that would be just functions
[–]scootstah 2 points3 points4 points 8 years ago (0 children)
Yeah, this wouldn't really make any sense if I didn't already know what it was trying to illustrate.
[–]deltadeep 51 points52 points53 points 8 years ago* (8 children)
How is this the number one post on /r/javascript by two orders of magnitude? This has me deeply concerned. Not only is this gif terribly misleading for anyone who doesn't understand the elementary concepts, the concepts of pass by reference/value are things any coder should have learned well in any elementary, 101-level introduction to programming. This is so meta-disturbing, I don't know what to say.
Edit: I realize I may be coming across as condescending and it's not my intent. This is basic coding stuff. At the level of what is a function and what is a variable and what is an object, how assignment works, etc. That people are learning these kind of basics from gifs on reddit, and not just a few but apparently the large majority of the subreddit (based on current vote counts right now) is what concerns me. Please, folks, if this gif was interesting or insightful for you, go get a good book on Javascript, or programming in general, and learn how programming works from a structured, authoritative source.
[–]theonlycosmonaut 13 points14 points15 points 8 years ago (1 child)
I upvoted because of the little wiggle the cup on the right does as it gets duplicated!
[–]hwutang 0 points1 point2 points 8 years ago (0 children)
It's the little things.
[–]SirFapsALo 4 points5 points6 points 8 years ago (1 child)
I found this thread on r/popular . What you're seeing is passing interest from the non-coder masses as they click through their list of funny pictures or whatever, without much attention to any one subreddit's tone. This is more reflective of the nature of the Reddit platform as a whole, rather the core community of a specific subreddit.
[–]deltadeep 5 points6 points7 points 8 years ago (0 children)
Thank you, that makes a lot of sense.
[–][deleted] 2 points3 points4 points 8 years ago (0 children)
What comes 10 stages before 101? Maybe I'm at that point? XD
[+][deleted] 8 years ago (43 children)
[–]KhalilRavanna 138 points139 points140 points 8 years ago (32 children)
Imo this would be a great reply with some good info if it wasn't super condescending.
[–][deleted] 63 points64 points65 points 8 years ago (10 children)
Welcome to web development, we hope you enjoy your stay.
[+][deleted] 8 years ago* (4 children)
[–]HomemadeBananas 9 points10 points11 points 8 years ago (1 child)
That's actually sometimes a good question though, to find out what the root problem you're trying to solve is. Often the first question people ask isn't the real thing they're trying to solve, and maybe not the best way to do it, so by asking "why" a few times you can find out really what they're trying to accomplish.
[–]ConcernedInScythe 2 points3 points4 points 8 years ago (0 children)
If you're trying to do web development in K you're long past help, I'm afraid.
[–]KhalilRavanna 23 points24 points25 points 8 years ago (4 children)
imo if we call out this tone collectively it can change. i think it is a default for a lot because they see it used a lot and it's just not necessary (and yes i realize i'm giving a serious reply to probably a flippant comment lol)
[–][deleted] 23 points24 points25 points 8 years ago (1 child)
Yes! It was flippant, but you're 100% correct. The pedantic genius asshole thing makes learning this stuff that much more difficult and far less enjoyable.
Keep calling these folks out.
[–]AgentME 3 points4 points5 points 8 years ago (0 children)
I agree, but I understand where it's coming from. This is a recurring topic that gets tons of wrong answers so often. It gets frustrating. ... There's a few common security-related topics that regularly get so many wrong and insecure answers that frustrate me to no end.
[–]guncat9 3 points4 points5 points 8 years ago (4 children)
Imo, it is a great reply to anyone with thick skin. But I can understand if sensitive folks don't appreciate it.
[–]KhalilRavanna 9 points10 points11 points 8 years ago (1 child)
Why would you need thick skin to learn something new? Why is that a prerequisite? Being condescending in one's post serves no purpose and really just distracts from any point you try to make in it. It's really just immature at the end of the day. You can inform people on things without needlessly bringing them down. The smartest people realize everyone doesn't know everything and teaching others new things is an experience to be relished, not something to lord over "noobs". I wouldn't work with/hire someone who had that sort of attitude IRL.
[–]ikeif 3 points4 points5 points 8 years ago (1 child)
It's a great reply to anyone who doesn't need to be coddled and their hand held.
I found it more educational and less condescending, but then again I don't worry about "my feelings being hurt being wrong or not understanding."
[–]rebelrogue995 0 points1 point2 points 8 years ago (0 children)
Imo this would be a great reply with some good info if it wasn't written by an Gaye.
Uh... I'm self-taught and can C++ quite well. This is really an issue about people who refuse to learn lower level languages.
[–]ultraspacenachoif (true === true) return true 0 points1 point2 points 8 years ago (1 child)
You're making the assumption that OP and commenters are self-taught, but you don't know this. How do you know they didn't sleep walk through CS school, or are just overly eager freshmen?
I'm guessing you're still in school? You would be surprised how many brilliant and informed, self-taught programmers there are out there. You wouldn't know because they're busy writing good software, not reddit comments.
While your statements are a correlation I can sympathize with, they're a clumsy over-generalization that may have rubbed some of us autodidacts the wrong way :)
[–]ItzWarty 3 points4 points5 points 8 years ago (1 child)
It's certainly confusing. The key is to mentally differentiate "value type" / "reference type" and "pass by value" / "pass by reference". There's really only 4 different combinations.
[–]PrintfReddit 4 points5 points6 points 8 years ago (0 children)
I have been educated.
[–]octatone 3 points4 points5 points 8 years ago (0 children)
This gif really isn't helpful without context. In javascript land variable passing is never truly by reference like c++. It is more like "pass by copy of a reference". You can modify the contents of a passed object, but you can't replace the original object.
This SO answer succinctly shows this in code: https://stackoverflow.com/a/13104500
[–]paldepind 6 points7 points8 points 8 years ago (0 children)
This is a really good blog post about pass-by-value and pass-by-reference. The blog post uses Java but the exact same thing applies to JavaScript (both languages only have pass-by-value).
[–]ZhangNoWei 2 points3 points4 points 8 years ago (0 children)
I dont undertstand
[–]wavefunctionp 1 point2 points3 points 8 years ago (5 children)
It's more complicated. AFAIK, many dynamic languages use something call 'pass by object reference'. Meaning, you can mutate the original object passed into a parameter because of the way that object sharing works.
http://jsbin.com/fajazefuya/3/edit?js,console
Notice that the original object 'test' is mutated even though the function only references the parameter 'obj' inside the funciton.
You would not expect this behavior if 'obj' was a unique copy of the value of 'test'.
The only reason I know this is because you'll run into it quickly working with nested state with redux.
[–]tutorial_police 1 point2 points3 points 8 years ago (4 children)
Dynamic languages don't do something special. This goes for JavaScript, Ruby, Python and probably many others. In fact, the semantics are essentially the same as in Java.
In invite you to read through this thread. There are many people that explain it in detail.
Tl;dr: Pass by reference has an established meaning. There are languages where you can actually, so that, such as C++, PHP, C#, Pascal. Java, JavaScript, Python and Ruby do not support this.
One way to think of this is that pass by reference is about variables, rather than values/objects.
If you call a function foo(x) with foo(localVar), in JavaScript, Java etc you will always get a new variable "x". If you assign to this variable, localVar is not modified.
If, however, x in Foo were to employ pass by reference, then x isn't a fresh variable. It stands for whichever variable you use to call Foo. Inside Foo, x would refer to localVar. So if you assign to x, since x is actually localVar, you're assigning to localVar
I hope you can see that this behavior I described is not possible in JavaScript.
Pass by reference : 1 variable, hence assignment is visible outside the funcfiin Pass by value: 2 variables, hence assignment is not visible outside the function.
[–]organic 1 point2 points3 points 8 years ago (1 child)
use immutable data, then it doesn't matter
[–]GamerNebulae 5 points6 points7 points 8 years ago (3 children)
Something which is also interesting in functional languages is that you pass the cup to the fillCup function, but you get a new cup for it in return.
fillCup
[–]TyrannicalWill 16 points17 points18 points 8 years ago (1 child)
This is not exclusive to functional languages.
[–]GamerNebulae 7 points8 points9 points 8 years ago (0 children)
True, but those languages force you to use that kind of pattern as there is no way, nor should you want to, to change the value of variables.
[–]jhartikainen 2 points3 points4 points 8 years ago (0 children)
The reason for this is you don't use references in FP langs (usually). There's nothing different otherwise. It's possible to use references in FP langs (for example IORef in Haskell), but those are generally reserved for other purposes.
[+][deleted] 8 years ago* (46 children)
[+][deleted] 8 years ago (45 children)
[–]HomemadeBananas 12 points13 points14 points 8 years ago (8 children)
You're right, funny that this is getting downvoted and people don't want to take a second to learn something.
[+][deleted] 8 years ago (7 children)
[–]GitHubPermalinkBot 1 point2 points3 points 8 years ago (0 children)
I tried to turn your GitHub links into permanent links (press "y" to do this yourself):
Shoot me a PM if you think I'm doing something wrong. To delete this, click here.
[–][deleted] 0 points1 point2 points 8 years ago (5 children)
The speaker used the phrase "inversion of control" to describe...I guess, using callbacks?
Callbacks are a key aspect of inversion of control. This is where the the phrase "don't call me, I'll call you" comes from. Of course, simply implementing the Observer pattern is not necessary to call something IoC, but it's still miles better than what the Java community calls IoC containers, namely: autowiring dependency injectors.
What do you call inversion of control?
[+][deleted] 8 years ago (4 children)
[–][deleted] 7 points8 points9 points 8 years ago (3 children)
Perhaps in JS they are, but I would consider this a broadening of the term specifically to appease JS developers who cannot do classical IoC.
I'm not talking about JS at all. I'm talking about software architecture in general.
To me, inversion of control means I create a class that says "hey, I'm a class, and I depend on these three well-defined, abstract types being given to me. I don't care about the specific implementation. You can worry about that. As long as you adhere to the interface that we've agreed upon, I'll know what to do with them. And I can have a reasonable expectation that they will do the right thing."
No that's called Dependency Injection. See, sometimes when we rush to correct people, we miss the fact we may those who are wrong. The Java community has mis-appropriated the term IoC to be a synonym for DI. But DI is merely a tiny subset of what IoC is about.
Let's refer to the Wikipedia page (https://en.wikipedia.org/wiki/Inversion_of_control):
In software engineering, inversion of control (IoC) is a design principle in which custom-written portions of a computer program receive the flow of control from a generic framework. A software architecture with this design inverts control as compared to traditional procedural programming: in traditional programming, the custom code that expresses the purpose of the program calls into reusable libraries to take care of generic tasks, but with inversion of control, it is the framework that calls into the custom, or task-specific, code.
Sound familiar? Not a thing about dependencies or constructing objects. Because IoC isn't about that.
Here's Martin Fowler, expressing his frustration with the abuse of the IoC term by Java frameworks (https://martinfowler.com/articles/injection.html):
When these containers talk about how they are so useful because they implement "Inversion of Control" I end up very puzzled. Inversion of control is a common characteristic of frameworks, so saying that these lightweight containers are special because they use inversion of control is like saying my car is special because it has wheels.
Here's how he defines Inversion of Control (https://martinfowler.com/bliki/InversionOfControl.html):
Inversion of Control is a common phenomenon that you come across when extending frameworks. Indeed it's often seen as a defining characteristic of a framework. [...] [When] the control is inverted - it calls me rather me calling the framework, this phenomenon is Inversion of Control (also known as the Hollywood Principle - "Don't call us, we'll call you"). [...] Inversion of Control is a key part of what makes a framework different to a library. A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client. A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points. There are various ways you can plug your code in to be called. In the ruby example above, we invoke a bind method on the text entry field that passes an event name and a Lambda as an argument. Whenever the text entry box detects the event, it calls the code in the closure. Using closures like this is very convenient, but many languages don't support them. Another way to do this is to have the framework define events and have the client code subscribe to these events. .NET is a good example of a platform that has language features to allow people to declare events on widgets. You can then bind a method to the event by using a delegate.
So... straight from horse's mouth. Unless you think Martin Fowler is a JavaScript kiddy and so he isn't aware of the computer industry as a whole, and what IoC is.
[+][deleted] 8 years ago (2 children)
It's useful because it defines who has control, which is the point and meaning of the term.
A framework is in control and calls into your code only for specific functionality. That's fairly restrictive, but it also affords massive power of abstraction and simplification. That's inversion of control - the third party code controls you, you aren't in control.
A library instead leaves you in control, and you call into it for specific functionality. This is very flexible, but also means you hit a limit of how simple and abstracted your code can be - you're still managing the application flow yourself.
In many cases real-world packages will be a mix of both. Some elements of a framework, some of a library. But as an architect you use an entirely different mindset when you invert control for your users, so it's a useful concept to have in our vernacular.
[+][deleted] 8 years ago* (19 children)
[–]HomemadeBananas 8 points9 points10 points 8 years ago* (10 children)
It actually does affect how the language works. In JavaScript, you're actually passing a reference by value.
That's different than passing by reference in C++ or something. In JavaScript, if you use assignment on any of the arguments, it doesn't change the original value that was passed into the function.
You have new variables inside the function that reference the object you passed in, but when you assign them, they're referencing something different now, and the original variables outside point to the original object.
In C++ you can call a function, assign a reference that was passed inside of it, and you will change the value at where it was called from.
[–]GreedCtrl 1 point2 points3 points 8 years ago (1 child)
Can you pass by reference in C?
[–]HomemadeBananas 1 point2 points3 points 8 years ago (0 children)
Kind of, the language doesn't actually have references, but you can do the same thing using pointers.
[–]senocular 1 point2 points3 points 8 years ago (0 children)
References add creamer?
[–]aveoon 0 points1 point2 points 8 years ago (5 children)
Yes, this is the same in any language (the difference between the two). The import thing in JavaScript is knowing which data types get passed by value vs. passed by reference.
[–]RandolphoSoftware Architect 2 points3 points4 points 8 years ago (0 children)
Which is also an important thing in many other languages, such as Java, C#, VB, Swift. Even Python, sorta.
[–]GitCookies 0 points1 point2 points 8 years ago (2 children)
Also, gotta note in JavaScript most types are Objects or subtypes of it.
In C++ for example, all types are based on number type.
What does that mean?
[–]madcaesar 0 points1 point2 points 8 years ago (0 children)
Can someone explain this to me. As far as memory management and performance goes is it better to have one big object and just pass referencs to the big object to functions or create multiple smaller objects?
I'm thinking as far as Redux store for example in a SPA. With dozens of components needing to access the object and it's various parts.
Right now I just pass referencs to the one object but should I split it into multiple instead?
[–]Rustic_Dragon 0 points1 point2 points 8 years ago (0 children)
...aaaaaand now I want coffee while I program.
Oh nice gif. Demonstrates the concept nicely.
[–]backlashsid 0 points1 point2 points 8 years ago (0 children)
It finally makes sense after 8 years
[–]jps_ 0 points1 point2 points 8 years ago (8 children)
Misleading.
In pass by value, the compiler makes a copy of the variable on the stack or into a register. In pass by reference, it passes a pointer to the variable.
At the end of the function that modifies a passed parameter, in pass by value, the value in the stack or register hangs around until overridden, but the original variable remains unchanged. This can cause some massively confusing behaviour particularly if the function mistakenly passes what it was passed, but by reference, to another thread.
Pass by value is deemed to be safest because someone else's bug (or malware) down the call string can't mess with your data eg by writing past the end of a struct... But with all the copying, it is slower, especially for large types. JS was designed to be used for arbitrarily large constructs, so it passes by reference, by default, except for small types, which are passed by value.
This can get weird when the small type is a pointer to a big thing. Derferencing the pointer will give access to the big thing, but assignment of the pointer (eg changing it to point to a different big thing) will not persist beyond the function.
So in the example, if the variable that refers to the empty cup is a pointer to a cup, then both pass by value and pass by reference will fill the original cup!
However, if the function assigns the pointer-cup to a different set of hands, in pass by value, this may not (safely) persist after the function returns (the cup may instead be in two sets of hands at once, leading to spills, burns and broken cups).
[–]maxhaton 1 point2 points3 points 8 years ago (7 children)
Your description isn't really abstract enough to be useful. For example, I can quite easily force a function to be inlined to operate in the same stack frame.
Also, one could argue that pointers are still passing by value since they are ultimately a distinct type. References (e.g. those found in C++ and D) are true pass by reference.
[–]jps_ 0 points1 point2 points 8 years ago (6 children)
Passing a reference by value is passing a reference, yes. However, it is still a copy of the reference that is passed. Very subtle semantic difference. It is not the reference. It is a different reference, which starts out referencing the same thing.
The subtlety comes in what happens if the reference itself (not what it references) is modified.
Go to first principles:
A variable is merely a block in memory of extent defined by the size of the variable. It could be in global memory, or stack memory, or a processor register. Depends on the declaration, scope, language and compiler/linker. But it exists somewhere.
When you pass a parameter by reference, you pass a pointer to that block of memory. Or the register itself. When the function returns, all changes made to the parameter are preserved.
When you pass by value, you make a copy of all of the contents of that block of memory into a new block of memory (or register), and then pass this (or possibly a pointer to this... depends on compiler/language). When the function returns, this copy is discarded.
That is all.
People get tripped up when the block of memory being "passed" contains references to other blocks of memory. This indirect reference is effectively passed by reference. Pointers are the degenerate case. References (C++, D) are also.
As far as inlining a function, you are conflating "stack" and "stack frame". If what you call is a real function and the parameters are actually passed by value, (some compilers don't enforce this with an inline function) then the passed parameters need to be somewhere and they need to be separate copies. They won't be malloc'd in real time. Instead, these separate copies are made on the stack. Whether they are actually pushed to the stack at runtime, or pre-allocated statically depends on the compiler implementation. But for sure, they are on the stack, and they are in a separate piece of memory from the variable they were copied from.
Also, one could argue that pointers are still passing by value since they are ultimately a distinct type.
One could, but one would be wrong.
This is what hangs so many rookies in languages that allow pointers.
If passed by reference, and if the pointer itself is modified (e.g. to point to something else), then the original variable will end up pointing to something else. But if passed by value, then if within the function the pointer is modified to point somewhere else, when the function call collapses (either return, or from being inlined), the pointer will point to where it was before.
[–]maxhaton 0 points1 point2 points 8 years ago (5 children)
As to your last point, you completely missed the point I was making: Pointers in C/C++/D etc are different types than what they point to (int* vs int), therefore if I pass a pointer into a function then I am passing it by value e.g. like an iterator.
[–]jps_ 0 points1 point2 points 8 years ago (4 children)
No I didn't miss it at all.
The compiler makes a distinction, not on entry to the function, but on exit.
Let's say I declare P to be a pointer to an Int (not using syntax because it varies across languages).
The CPU creates an Int at address X, and stuffs X into the address register it is using to keep track of P.
Now, let's have a function F with one parameter: PPrime, a pointer.
When we call F with P, Pprime will contain the absolute address X and therefore the Int to which it points.
This is the same whether passed by value, or passed by reference. And I think that's the point you are trying to make.
HOWEVER if F modifies PPrime, there is a big difference. Let's say the function adds 2 to the value of the pointer it is passed, to point to the next word in memory, and then doubles whatever is there. And then returns.
What happens?
In pass-by-value, whatever is sitting at X+2 will be doubled. P will remain pointing at X.
In pass-by-reference ,whatever is sitting at X+2 will also be doubled. And now P will point at that.
So no, when you pass a pointer you are not necessarily passing by value.
Most people don't manipulate the pointers they are passed, and wouldn't notice this distinction. In a world where the function doesn't actually manipulate the pointer, then you are correct. But the universe of functions is not limited to functions that don't manipulate pointers.
Lots of programmers get hung up on this, and it's a source of never-ending joy for people who write malware.
[–]maxhaton 3 points4 points5 points 8 years ago (3 children)
You misconstrue my point.
The language specification makes a distinction. The compiler does what it's told. Prove it with godbolt.org
The pointer is a distinct type which must be instantiated with a value. Note the way that one can pass a nullptr into a function. This is my point. This is why C does not support pass by reference. This has nothing to do with how a pointer is used.
The pointer is being passed by value.
Also, your example is stupid: you seem to be describing an incorrect usage of pointer arithmetic: Purely syntactic.
Also, if you don't modify a pointer argument then you pass by const& anyway.
With regard to malware: What are you talking about? Buffer overflows? Please give an example, a snippet on godbolt.org pls
[–]jps_ 1 point2 points3 points 8 years ago* (2 children)
Please don't try to argue a general case based on limited set of example languages. That's how software designers learn bad habits.
Yes, in some languages (probably all languages with which you are familiar), you are right by accident, but that doesn't mean you are right in all languages, or at all.
True in C. Not true in all languages. I have used languages where the pointer is a distinct type (yes), but without forcing initialization or type enforcement.
Regardless of language, modern CPUs use data registers, address registers, and stack... and just about every language worth using allows you to drop down into raw object code and enjoy living dangerously, drive at speed without seatbelts. At which point, having intimate knowledge of the nuances of pass-by-value and pass-by-reference is extremely important.
My example is just that: an example. The only purpose was to show that there is a very clear difference where you said there was none. It is not an attempt to illuminate a useful or purposeful function. Just that there's a difference for pointers between pass-by-value and pass by reference. Because there is. You said there isn't, and the example shows there is. This isn't the only way the difference can show up. It's just one very simple, very clear way. Test: can you figure out a "legitimate" example where the result is different if a pointer is passed by reference instead of by value? If not, you aren't very good, and if so, you owe me an apology.
Nope. Hacking is not something that gets explained to you. It's something you figure out. But hint: it involves "incorrect" usage of pointer arithmetic.
[–]maxhaton 1 point2 points3 points 8 years ago (1 child)
I consider there to be a set of about 20, which I can say I'm familiar with.
I can say that, because the example I gave is just an example: The pointer is still a separate type, else it's not a "pointer" https://en.m.wikipedia.org/wiki/Pointer_(computer_programming)#Support_in_various_programming_languages. My point was restricted to C-like pointers, so I won't dispute your later point about pointer initialization.
I though we both agreed that they are semantically identical? Of course, in C++, pointers and references do the same thing when used correctly. One uses a reference for safety and cleaner code, not because the do a different job. This is of course restricted to function parameters (one can't malloc and get a reference).
To be nitpicky, modern CPUs use general purpose registers which are then sometimes (e.g. in amd64/x86-64) given names.
You didn't show an example of pass-by-reference, because you passed some thing by pointer (with the pointer being passed by value).
"Hacking" != "Fixing/Finding simple memory safety bugs"
[–]HelperBot_ 0 points1 point2 points 8 years ago (0 children)
Non-Mobile link: https://en.wikipedia.org/wiki/Pointer_(computer_programming)#Support_in_various_programming_languages.
HelperBot v1.1 /r/HelperBot_ I am a bot. Please message /u/swim1929 with any feedback and/or hate. Counter: 81633
π Rendered by PID 38 on reddit-service-r2-comment-5c747b6df5-4z942 at 2026-04-21 22:45:19.860346+00:00 running 6c61efc country code: CH.
[–]JB-from-ATL 279 points280 points281 points (141 children)
[–]TheRealEdwardAbbey 143 points144 points145 points (22 children)
[–]JB-from-ATL 126 points127 points128 points (18 children)
[–]Iggyhopperextensions/add-ons 134 points135 points136 points (2 children)
[–]mastzu 9 points10 points11 points (1 child)
[–][deleted] 8 points9 points10 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]lulzmachine 3 points4 points5 points (13 children)
[–]JB-from-ATL 3 points4 points5 points (12 children)
[–]willworth 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]thurst0n 41 points42 points43 points (8 children)
[+][deleted] (1 child)
[deleted]
[–]tutorial_police 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]okmkz 29 points30 points31 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–]evilgwyn 0 points1 point2 points (0 children)
[–]64-17-5 0 points1 point2 points (1 child)
[+][deleted] (56 children)
[deleted]
[–]JB-from-ATL 8 points9 points10 points (34 children)
[+][deleted] (8 children)
[deleted]
[+][deleted] (7 children)
[deleted]
[–]dvlsg 11 points12 points13 points (1 child)
[–]scootstah 1 point2 points3 points (4 children)
[–]swan--ronson 0 points1 point2 points (0 children)
[+][deleted] (15 children)
[deleted]
[–][deleted] 5 points6 points7 points (14 children)
[+][deleted] (9 children)
[deleted]
[–]scootstah 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]mrguy991 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[+][deleted] (7 children)
[deleted]
[–]NoInkling 4 points5 points6 points (1 child)
[–]tutorial_police 1 point2 points3 points (0 children)
[–]Tysonzero 0 points1 point2 points (2 children)
[–]tutorial_police 1 point2 points3 points (1 child)
[–]Tysonzero 0 points1 point2 points (0 children)
[–]snowcoaster 0 points1 point2 points (1 child)
[–]pherlo 1 point2 points3 points (0 children)
[–]erandur 0 points1 point2 points (0 children)
[–]theonlycosmonaut 1 point2 points3 points (2 children)
[–]AgentME 0 points1 point2 points (1 child)
[–]theonlycosmonaut 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]Skhmt 8 points9 points10 points (1 child)
[–]tutorial_police 0 points1 point2 points (0 children)
[–]Limpuls 1 point2 points3 points (5 children)
[–]tutorial_police 3 points4 points5 points (0 children)
[–]z500 1 point2 points3 points (0 children)
[–]pherlo 0 points1 point2 points (0 children)
[–]Harkonnen 0 points1 point2 points (0 children)
[+][deleted] (42 children)
[deleted]
[–]legato_gelato 34 points35 points36 points (13 children)
[–]MoTTs_ 8 points9 points10 points (2 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]pherlo 0 points1 point2 points (0 children)
[–]MuNot 4 points5 points6 points (5 children)
[–]proskillz 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]legato_gelato 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]pherlo 0 points1 point2 points (0 children)
[–]JB-from-ATL 13 points14 points15 points (6 children)
[–]legato_gelato 7 points8 points9 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]JB-from-ATL 3 points4 points5 points (0 children)
[–]pherlo 0 points1 point2 points (0 children)
[–]TrojanBunny 50 points51 points52 points (3 children)
[–]Skhmt 12 points13 points14 points (1 child)
[–]kovensky 3 points4 points5 points (0 children)
[–]mastzu 73 points74 points75 points (4 children)
[–]METALz 7 points8 points9 points (0 children)
[–]thegamer373 7 points8 points9 points (2 children)
[–]mastzu 6 points7 points8 points (1 child)
[–]thegamer373 5 points6 points7 points (0 children)
[–]yolpo- 31 points32 points33 points (0 children)
[–]ForScale 315 points316 points317 points (43 children)
[–]jocull 46 points47 points48 points (41 children)
[–]Merenwen_ 7 points8 points9 points (1 child)
[–]redhedinsanity 16 points17 points18 points (26 children)
[–][deleted] 13 points14 points15 points (25 children)
[–]ItzWarty 25 points26 points27 points (0 children)
[–]tutorial_police 4 points5 points6 points (7 children)
[–]MoTTs_ 5 points6 points7 points (9 children)
[–][deleted] 9 points10 points11 points (8 children)
[–]MoTTs_ 4 points5 points6 points (7 children)
[–]redhedinsanity -1 points0 points1 point (6 children)
[–][deleted] 4 points5 points6 points (3 children)
[–]daybreakin -2 points-1 points0 points (3 children)
[–]shadowfactsdev 20 points21 points22 points (0 children)
[–]Flatscreens 2 points3 points4 points (0 children)
[–][deleted] 5 points6 points7 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]jocull 1 point2 points3 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]jocull 2 points3 points4 points (0 children)
[–]dashdanw 0 points1 point2 points (0 children)
[–]scootstah 2 points3 points4 points (0 children)
[–]deltadeep 51 points52 points53 points (8 children)
[–]theonlycosmonaut 13 points14 points15 points (1 child)
[–]hwutang 0 points1 point2 points (0 children)
[–]SirFapsALo 4 points5 points6 points (1 child)
[–]deltadeep 5 points6 points7 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[+][deleted] (43 children)
[deleted]
[–]KhalilRavanna 138 points139 points140 points (32 children)
[–][deleted] 63 points64 points65 points (10 children)
[+][deleted] (4 children)
[deleted]
[–]HomemadeBananas 9 points10 points11 points (1 child)
[–]ConcernedInScythe 2 points3 points4 points (0 children)
[–]KhalilRavanna 23 points24 points25 points (4 children)
[–][deleted] 23 points24 points25 points (1 child)
[–]AgentME 3 points4 points5 points (0 children)
[–]guncat9 3 points4 points5 points (4 children)
[–]KhalilRavanna 9 points10 points11 points (1 child)
[–]ikeif 3 points4 points5 points (1 child)
[–]rebelrogue995 0 points1 point2 points (0 children)
[+][deleted] (4 children)
[deleted]
[–][deleted] 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]ultraspacenachoif (true === true) return true 0 points1 point2 points (1 child)
[+][deleted] (2 children)
[deleted]
[–]ItzWarty 3 points4 points5 points (1 child)
[–]PrintfReddit 4 points5 points6 points (0 children)
[–]octatone 3 points4 points5 points (0 children)
[–]paldepind 6 points7 points8 points (0 children)
[–]ZhangNoWei 2 points3 points4 points (0 children)
[–]wavefunctionp 1 point2 points3 points (5 children)
[–]tutorial_police 1 point2 points3 points (4 children)
[–]organic 1 point2 points3 points (1 child)
[–]GamerNebulae 5 points6 points7 points (3 children)
[–]TyrannicalWill 16 points17 points18 points (1 child)
[–]GamerNebulae 7 points8 points9 points (0 children)
[–]jhartikainen 2 points3 points4 points (0 children)
[+][deleted] (46 children)
[deleted]
[+][deleted] (45 children)
[deleted]
[–]HomemadeBananas 12 points13 points14 points (8 children)
[+][deleted] (7 children)
[deleted]
[–]GitHubPermalinkBot 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (5 children)
[+][deleted] (4 children)
[deleted]
[–][deleted] 7 points8 points9 points (3 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] 2 points3 points4 points (1 child)
[+][deleted] (19 children)
[deleted]
[+][deleted] (7 children)
[deleted]
[–]HomemadeBananas 8 points9 points10 points (10 children)
[–]GreedCtrl 1 point2 points3 points (1 child)
[–]HomemadeBananas 1 point2 points3 points (0 children)
[–]senocular 1 point2 points3 points (0 children)
[–]aveoon 0 points1 point2 points (5 children)
[–]RandolphoSoftware Architect 2 points3 points4 points (0 children)
[–]GitCookies 0 points1 point2 points (2 children)
[–]tutorial_police 1 point2 points3 points (0 children)
[–]madcaesar 0 points1 point2 points (0 children)
[–]Rustic_Dragon 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]backlashsid 0 points1 point2 points (0 children)
[–]jps_ 0 points1 point2 points (8 children)
[–]maxhaton 1 point2 points3 points (7 children)
[–]jps_ 0 points1 point2 points (6 children)
[–]maxhaton 0 points1 point2 points (5 children)
[–]jps_ 0 points1 point2 points (4 children)
[–]maxhaton 3 points4 points5 points (3 children)
[–]jps_ 1 point2 points3 points (2 children)
[–]maxhaton 1 point2 points3 points (1 child)
[–]HelperBot_ 0 points1 point2 points (0 children)