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-24 16:04

>>83
They think that they want it, but it's only entertaining for the first five minutes that you use the app.  Eventually, you're going to want to just listen to MP3s.  And you're going to want your IDE to just compile programs, quickly.  And you're going to want your browser to just load web pages, quickly.  So you turn off "visual styles" and "file association monitoring agents" and you start removing those 60 icons from your system tray because you figure out that you actually want to use your own CPU cycles.

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