Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Everything Is References

Name: Anonymous 2010-08-20 16:29

Is there a language in which variables, function arguments, etc, are always references by default?

For example:

int x = 5;
int y = x;
y++;  // x and y are both 6


If you really did want a copy of something, you'd have to use a keyword:

int x = 5;
int y = copy(x);


And pass-by-value would also have to be done explicitly:

void func(int z)
{
   int w = copy(z); // now w is effectively "local"
}


It would force programmers to at least be aware of the fact that they're making a copy.

Name: Anonymous 2010-08-21 11:14

>>37
Wow, you are the reason that it's been so easy for me to get unexpectedly high-paying jobs, and I had no idea until now.  I shouldn't even argue with you...  I should encourage all developers to think like that.

Just look at all the programs you have running right now


Name     | Efficiency matters?
---------+--------------------
Firefox  | Yes
My IDE   | Yes


Those are all the applications that I have running.

I'll assume that you intended to include low-level shit so let's take a look at those:


Name            | Efficiency matters?
----------------+--------------------
Windows         | Yes
Explorer        | Yes
Network shit    | Yes
Video drivers   | Yes
Sound drivers   | Yes
Mouse driver    | Yes
USB drivers     | Yes
Keyboard driver | No

Name: Anonymous 2010-08-21 11:19

>>38
Wait, I just launched another app.


Name    | Efficiency matters?
--------+--------------------
Winamp  | Yes

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List