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 7:41

>>38,39
I just want to point out how misleading your programs list is. All you pointed out were a list of drivers and the OS. Of course that stuff needs to be written low-level.

For an app like Winamp, efficiency definitely does not matter. The only parts that need to be efficient are MP3 decoding and database management, both of which should be handled by separate dedicated low-level libraries (something like SQLite or BerkeleyDB). In some cases these facilities are provided by the OS (for instance an iPhone provides CoreAudio decoders and SQLite as built-in libraries.)

Winamp got horribly slow around version 3, and the language had nothing to do with it. It was still written in C++.

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