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 10:54

>>35
Surely you are trolling. Yes, all 3D games do fall into that 1%.

The vast majority of the applications on your computer are not performance critical. Just look at all the programs you have running right now. Look at your system tray. There are all sorts of apps and tools that just do not need to be written in a bare-metal language.

You are also forgetting that most software is actually internal business software; it is never made available to the general public. It's just software that businesses develop internally or have commissioned to be developed for internal use. Except for a few specific use cases (like high-speed trading), this shit does not need to be written in a bare-metal language; it is better off being written in something safe and high-level, because bugs are a far more important consideration than speed.

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