"always passes by reference"
Ulrich Schreiner
ulrich.schreiner at innuendo.de
Mon Jul 31 13:11:05 EDT 2000
More information about the Python-list mailing list
Mon Jul 31 13:11:05 EDT 2000
- Previous message (by thread): "always passes by reference"
- Next message (by thread): compile.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
you try to describe highlevel features with lowlevel arguments. this will fail. i'm currently working with linux/KDE to write this answer. i see a window with a grey background on the screen, a toolbar and much more. in some way these things are 0s and 1s in the memory of my graphiccard but you won't get happy with this binary view. in my opinion it is the same with computer languages. when working with high level oo languages you really do NOT work with 0s and 1s, you are working with objects. when programming with c or assembler you have to know about addresses and memory locations and much more. otherwise you will fail. but you can not compare this c/assembler view with an objectoriented view. you will fail too if you try to describe highlevel language paradigmas with the assembler view (every language will implement it in another way). "(Greg Weeks)" wrote: > So you phase it. I would never talk that way myself, and if someone asked > me to describe what was going on, I would use quite different words, eg: > Each object is the address of a region of memory -- an address that can be > written to multiple locations. You prefer to think of the object as a > region of memory [I think], and you define a writing of that memory's > address to be a "reference". I prefer to think of the object as an > address, and I don't give any special name to a writing of that address. > > There is no right or wrong here, but there is also no single correct > description of what is going on. Some say Python is call-by-reference, > some say Python is call-by-value. Everyone is correct. > > Greg > > PS: My motivation for my particular phasing is that I like to view all data > in the computer as patterns of 0s and 1s. (I find this tidy and easy to > remember.) An address is a pattern of 0s and 1s. A block of memory is > not. So, for me, a datum can be an address, but not a block of memory.
- Previous message (by thread): "always passes by reference"
- Next message (by thread): compile.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list