Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #4380 > unrolled thread

What other languages use the same data model as Python?

Started bySteven D'Aprano <steve+comp.lang.python@pearwood.info>
First post2011-05-01 08:45 +0000
Last post2011-05-04 07:28 -0700
Articles 20 on this page of 176 — 34 participants

Back to article view | Back to comp.lang.python


Contents

  What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-01 08:45 +0000
    Re: What other languages use the same data model as Python? Alec Taylor <alec.taylor6@gmail.com> - 2011-05-01 19:00 +1000
    Re: What other languages use the same data model as Python? Chris Rebert <clp2@rebertia.com> - 2011-05-01 02:04 -0700
    Re: What other languages use the same data model as Python? Terry Reedy <tjreedy@udel.edu> - 2011-05-01 15:10 -0400
      Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-02 10:37 +1200
      Re: What other languages use the same data model as Python? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-02 07:45 +0000
        Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-02 13:12 +0000
    Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-02 10:33 +1200
      Re: What other languages use the same data model as Python? Terry Reedy <tjreedy@udel.edu> - 2011-05-01 21:42 -0400
    Re: What other languages use the same data model as Python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-02 00:28 -0700
      Re: What other languages use the same data model as Python? Duncan Booth <duncan.booth@invalid.invalid> - 2011-05-02 08:43 +0000
    Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-03 13:39 +0100
      Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-03 14:49 +0000
      Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-03 15:20 +0000
        Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-03 22:10 +0100
      Re: What other languages use the same data model as Python? Mel <mwilson@the-wire.com> - 2011-05-03 12:33 -0400
        Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-03 16:52 +0000
        Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-03 21:47 +0100
          Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-04 08:00 +1000
        Re: What other languages use the same data model as Python? Devin Jeanpierre <jeanpierreda@gmail.com> - 2011-05-04 02:56 -0700
          Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-04 10:51 +0000
            Re: What other languages use the same data model as Python? Paul Rubin <no.email@nospam.invalid> - 2011-05-04 03:58 -0700
            Re: What other languages use the same data model as Python? Devin Jeanpierre <jeanpierreda@gmail.com> - 2011-05-04 06:12 -0700
              Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-04 14:44 +0100
                Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-05 00:20 +1000
                  Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-04 18:09 +0100
                Re: What other languages use the same data model as Python? Devin Jeanpierre <jeanpierreda@gmail.com> - 2011-05-04 09:18 -0700
                  Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-04 18:03 +0100
                    Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-05 20:55 +1200
                      Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-05 11:31 +0100
                        Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-07 21:21 +1200
                          Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-07 19:28 +1000
                            Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-08 10:39 +1200
                            Re: What other languages use the same data model as Python? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-05-20 20:56 +0000
                          Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-08 02:17 +0000
                            Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-07 23:10 -0500
                            Re: What other languages use the same data model as Python? rusi <rustompmody@gmail.com> - 2011-05-07 22:48 -0700
                            Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-09 12:52 +1200
                              Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-09 11:38 +0100
                                Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-09 21:18 +1000
                                  Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-09 21:53 +0100
                              Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-09 14:29 +0000
                                Re: What other languages use the same data model as Python? Tim Golden <mail@timgolden.me.uk> - 2011-05-09 15:41 +0100
                                Re: What other languages use the same data model as Python? Ethan Furman <ethan@stoneleaf.us> - 2011-05-09 10:15 -0700
                                Re: What other languages use the same data model as Python? Mel <mwilson@the-wire.com> - 2011-05-09 13:38 -0400
                                Re: What other languages use the same data model as Python? Terry Reedy <tjreedy@udel.edu> - 2011-05-09 16:23 -0400
                                Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-10 19:41 +1200
                                  Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-10 19:35 +1000
                                    Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-11 10:47 +1200
                                  Re: What other languages use the same data model as Python? Terry Reedy <tjreedy@udel.edu> - 2011-05-10 15:18 -0400
                                Re: What other languages use the same data model as Python? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-05-20 21:17 +0000
                              Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-09 16:28 -0500
                          Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-09 07:23 +0100
                  Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-05 15:14 +0000
                Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 14:22 -0500
                  Re: What other languages use the same data model as Python? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-05-04 15:46 -0400
                    Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 14:58 -0500
                      Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-04 21:40 +0100
                      Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-05 21:31 +1200
                      Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-05 14:50 +0000
                    Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-05 12:14 +0000
                      Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-05 22:37 +1000
                  Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-04 20:58 +0100
                    Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 16:49 -0500
                      Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-05 07:12 +0100
                  Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-05 21:08 +1200
                    Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-05 19:12 +1000
                    Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 14:30 +0000
                    Re: What other languages use the same data model as Python? TheSaint <nobody@nowhere.net.no> - 2011-05-07 20:18 +0800
                  Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-05 12:49 +0000
                    Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 14:31 +0000
                    Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-05 09:40 -0500
                    Re: What other languages use the same data model as Python? Roy Smith <roy@panix.com> - 2011-05-05 10:49 -0400
              Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 14:47 -0500
            Re: What other languages use the same data model as Python? Ben Finney <ben+python@benfinney.id.au> - 2011-05-05 07:43 +1000
              Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-05 12:43 +1000
              Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-05 15:42 +0000
                Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-07 22:04 +1200
                  Re: What other languages use the same data model as Python? Ben Finney <ben+python@benfinney.id.au> - 2011-05-08 06:09 +1000
                    Re: What other languages use the same data model as Python? Roy Smith <roy@panix.com> - 2011-05-07 16:24 -0400
                    Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-08 10:54 +1200
                      Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-08 09:43 +1000
                      Re: What other languages use the same data model as Python? Ben Finney <ben+python@benfinney.id.au> - 2011-05-08 11:16 +1000
                      Re: What other languages use the same data model as Python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-07 23:16 -0700
                      Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-08 16:32 +1000
                Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-10 13:49 +1200
                  Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-10 03:13 +0000
                  Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-10 14:05 +0000
                    Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-10 16:09 +0100
                      Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-10 15:16 +0000
                        Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-11 01:27 +1000
                          Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-10 16:40 +0100
                            Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-11 01:44 +1000
                Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-10 13:51 +1200
                  Re: What other languages use the same data model as Python? MRAB <python@mrabarnett.plus.com> - 2011-05-10 03:47 +0100
                  Re: What other languages use the same data model as Python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-09 23:15 -0700
            Re: What other languages use the same data model as Python? John Nagle <nagle@animats.com> - 2011-05-04 14:52 -0700
              Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 19:46 -0500
                Re: What other languages use the same data model as Python? John Nagle <nagle@animats.com> - 2011-05-04 21:32 -0700
                  Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-05 22:06 +1200
                    Re: What other languages use the same data model as Python? John Nagle <nagle@animats.com> - 2011-05-05 08:41 -0700
                      Re: What other languages use the same data model as Python? Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-05 10:44 -0600
                        Re: What other languages use the same data model as Python? Chris Torek <nospam@torek.net> - 2011-05-06 17:57 +0000
                      Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-07 21:39 +1200
                  Re: What other languages use the same data model as Python? Mel <mwilson@the-wire.com> - 2011-05-05 07:44 -0400
                    Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-05 21:48 +1000
                      Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-05 13:59 +0000
                        Re: What other languages use the same data model as Python? John Nagle <nagle@animats.com> - 2011-05-05 08:58 -0700
              Re: What other languages use the same data model as Python? Neil Cerutti <neilc@norwich.edu> - 2011-05-05 13:19 +0000
                Re: What other languages use the same data model as Python? Terry Reedy <tjreedy@udel.edu> - 2011-05-05 14:39 -0400
          Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-04 11:56 +0100
            Re: What other languages use the same data model as Python? Devin Jeanpierre <jeanpierreda@gmail.com> - 2011-05-04 06:13 -0700
            Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 14:33 -0500
              Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-04 20:19 +0000
                Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 16:35 -0500
                  Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-04 21:57 +0000
                    Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 20:11 -0500
                      Re: What other languages use the same data model as Python? Mark Hammond <mhammond@skippinet.com.au> - 2011-05-05 12:09 +1000
                        Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 23:01 -0500
                          Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-05 22:19 +1200
                            Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 14:17 +0000
                              Re: What other languages use the same data model as Python? Roy Smith <roy@panix.com> - 2011-05-05 10:31 -0400
                                Re: What other languages use the same data model as Python? Neil Cerutti <neilc@norwich.edu> - 2011-05-05 15:10 +0000
                                  Re: What other languages use the same data model as Python? Roy Smith <roy@panix.com> - 2011-05-05 11:29 -0400
                                    Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-06 08:01 +1000
                                      Re: What other languages use the same data model as Python? Neil Cerutti <neilc@norwich.edu> - 2011-05-06 13:10 +0000
                                  Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 16:57 +0000
                                Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 16:56 +0000
                              Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-05 11:58 -0500
                                Re: What other languages use the same data model as Python? Neil Cerutti <neilc@norwich.edu> - 2011-05-05 17:39 +0000
                                Re: What other languages use the same data model as Python? Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-05 13:13 -0600
                                  Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-05 15:12 -0500
                      Re: What other languages use the same data model as Python? Tim Roberts <timr@probo.com> - 2011-05-04 20:23 -0700
                        Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 23:55 -0500
                          Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 14:21 +0000
                        Re: What other languages use the same data model as Python? Mel <mwilson@the-wire.com> - 2011-05-05 08:09 -0400
                      Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-05 07:34 +0100
                      Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-05 14:10 +0000
                        Re: What other languages use the same data model as Python? Mel <mwilson@the-wire.com> - 2011-05-05 11:30 -0400
                          Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-05 10:56 -0500
                          RE: What other languages use the same data model as Python? Andreas Tawn <andreas.tawn@ubisoft.com> - 2011-05-05 18:27 +0200
                            Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-07 22:09 +1200
                          Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-06 07:56 +1000
                      Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 14:14 +0000
                        Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-05 15:11 +0000
                          Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-05 11:00 -0500
                            Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 16:52 +0000
                              Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-05 12:03 -0500
                              Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-07 22:12 +1200
                                Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-07 12:03 +0000
                          Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 16:48 +0000
                          Re: What other languages use the same data model as Python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-05 22:24 -0700
                        Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-05 11:18 -0500
                          Re: What other languages use the same data model as Python? Ethan Furman <ethan@stoneleaf.us> - 2011-05-05 10:28 -0700
                            Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-05 12:19 -0500
                      Re: What other languages use the same data model as Python? Chris Torek <nospam@torek.net> - 2011-05-06 18:17 +0000
                        Re: What other languages use the same data model as Python? Chris Torek <nospam@torek.net> - 2011-05-06 19:06 +0000
                          Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-06 14:25 -0500
                            Re: What other languages use the same data model as Python? Chris Angelico <rosuav@gmail.com> - 2011-05-07 09:43 +1000
                  Re: What other languages use the same data model as Python? Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-04 16:22 -0600
                    Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-04 19:51 -0500
                    Re: What other languages use the same data model as Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-05 14:51 +0000
              Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-04 21:20 +0100
              Re: What other languages use the same data model as Python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-04 22:10 -0700
                Re: What other languages use the same data model as Python? harrismh777 <harrismh777@charter.net> - 2011-05-05 00:19 -0500
                  Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 14:25 +0000
        Re: What other languages use the same data model as Python? sturlamolden <sturla@molden.no> - 2011-05-04 07:44 -0700
          Re: What other languages use the same data model as Python? Michael Torrie <torriem@gmail.com> - 2011-05-04 09:40 -0600
            Re: What other languages use the same data model as Python? sturlamolden <sturla@molden.no> - 2011-05-04 09:40 -0700
              Re: What other languages use the same data model as Python? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-05-04 13:15 -0400
                Re: What other languages use the same data model as Python? sturlamolden <sturla@molden.no> - 2011-05-04 10:19 -0700
      Re: What other languages use the same data model as Python? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-05 15:48 +1200
        Re: What other languages use the same data model as Python? Hans Georg Schaathun <hg@schaathun.net> - 2011-05-05 05:58 +0100
        Re: What other languages use the same data model as Python? Grant Edwards <invalid@invalid.invalid> - 2011-05-05 14:24 +0000
    Re: What other languages use the same data model as Python? Hrvoje Niksic <hniksic@xemacs.org> - 2011-05-03 15:50 +0200
      Re: What other languages use the same data model as Python? sturlamolden <sturla@molden.no> - 2011-05-04 07:28 -0700

Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9  Next page →


#4748

FromJohn Nagle <nagle@animats.com>
Date2011-05-05 08:41 -0700
Message-ID<4dc2c52e$0$10567$742ec2ed@news.sonic.net>
In reply to#4708
On 5/5/2011 3:06 AM, Gregory Ewing wrote:
> John Nagle wrote:
>
>> A reasonable compromise would be that "is" is treated as "==" on
>> immutable objects.
>
> That wouldn't work for tuples, which can contain references
> to other objects that are not immutable.

     Such tuples are still identical, even if they
contain identical references to immutable objects.

				John Nagle

[toc] | [prev] | [next] | [standalone]


#4758

FromIan Kelly <ian.g.kelly@gmail.com>
Date2011-05-05 10:44 -0600
Message-ID<mailman.1196.1304613911.9059.python-list@python.org>
In reply to#4748
On Thu, May 5, 2011 at 9:41 AM, John Nagle <nagle@animats.com> wrote:
> On 5/5/2011 3:06 AM, Gregory Ewing wrote:
>>
>> John Nagle wrote:
>>
>>> A reasonable compromise would be that "is" is treated as "==" on
>>> immutable objects.
>>
>> That wouldn't work for tuples, which can contain references
>> to other objects that are not immutable.
>
>    Such tuples are still identical, even if they
> contain identical references to immutable objects.

>>> a = (1, 2, [3, 4, 5])
>>> b = (1, 2, [3, 4, 5])
>>> a == b
True
>>> a is b  # Using the proposed definition
True
>>> a[0] is b[0]
True
>>> a[1] is b[1]
True
>>> a[2] is b[2]
False
>>> a[2].append(6)
>>> a
(1, 2, [3, 4, 5, 6])
>>> b
(1, 2, [3, 4, 5])
>>> a == b
False
>>> a is b
False

Thus a and b cannot be used interchangeably even though "a is b"
originally returned True.

[toc] | [prev] | [next] | [standalone]


#4845

FromChris Torek <nospam@torek.net>
Date2011-05-06 17:57 +0000
Message-ID<iq1cpf021vl@news2.newsguy.com>
In reply to#4758
>>> John Nagle wrote:
>>>> A reasonable compromise would be that "is" is treated as "==" on
>>>> immutable objects.

(Note: I have no dog in this fight, I would be happy with a changed
"is" or with the current one -- leaky abstractions are fine with
me, provided I am told *when* they may -- or sometimes may not --
leak. :-) )

>> On 5/5/2011 3:06 AM, Gregory Ewing wrote:
>>> That wouldn't work for tuples, which can contain references
>>> to other objects that are not immutable.

>On Thu, May 5, 2011 at 9:41 AM, John Nagle <nagle@animats.com> wrote:
>> Such tuples are still identical, even if they
>> contain identical references to immutable objects.

In article <mailman.1196.1304613911.9059.python-list@python.org>
Ian Kelly  <ian.g.kelly@gmail.com> wrote:
>>>> a = (1, 2, [3, 4, 5])
>>>> b = (1, 2, [3, 4, 5])
>>>> a == b
>True
>>>> a is b  # Using the proposed definition
>True

I believe that John Nagle's proposal would make "a is b" false,
because while a and b are both immutable, they contain *different*
refernces to *mutable* objects (thus failing the "identical
references to immutable objects" part of the claim).

On the other hand, should one do:

    L = [3, 4, 5]
    a = (1, 2, L)
    b = (1, 2, L)

then "a is b" should (I say) be True under the proposal -- even
though they contain (identical) references to *mutable* objects.
Loosely speaking, we would define the "is" relation as:

    (x is y) if and only if
       (id(x) == id(y)
           or
           (x is immutable and y is immutable and
                (for all components xi and yi of x, xi is yi)))

In this case, even if the tuples "a" and "b" have different id()s,
we would find that both have an immutable type, and both have
components -- in this case, numbered, subscriptable tuple elements,
but instances of immutable class types like decimal.Decimal would
have dictionaries instead -- and thus we would recursively apply
the modified "is" definition to each element.  (For tuples, the
"all components" implies that the lengths must be equal; for class
instances, it implies that they need to have "is"-equal attributes,
etc.)

It's not entirely clear to me whether different immutable classes
(i.e., different types) but with identical everything-else should
compare equal under this modified "is".  I.e., today:

    $ cp /usr/lib/python2.?/decimal.py /tmp/deccopy.py
    $ python
    ...
    >>> sys.path.append('/tmp')
    >>> import decimal
    >>> import deccopy
    >>> x = decimal.Decimal('1')
    >>> y = deccopy.Decimal('1')
    >>> print x, y
    1 1
    >>> x == y
    False

and obviously "x is y" is currently False:

    >>> type(x)
    <class 'decimal.Decimal'>
    >>> type(y)
    <class 'deccopy.Decimal'>

However, even though the types differ, both x and y are immutable
[%] and obviously (because I copied the code) they have all the
same operations.  Since they were both created with the same starting
value, x and y will behave identically given identical treatment.
As such, it might be reasonable to ask that "x is y" be True
rather than False.

[% This is not at all obvious -- I have written an immutable class,
and it is pretty easy to accidentally mutate an instance inside
the class implementation.  There is nothing to prevent this in
CPython, at least.  If there were a minor bug in the decimal.Decimal
code such that x.invoke_bug() modified x, then x would *not* be
immutable, even though it is "intended to be".  (As far as I know
there are no such bugs in decimal.Decimal, it's just that I had
them in my "Money" class.)]
-- 
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W)  +1 801 277 2603
email: gmail (figure it out)      http://web.torek.net/torek/index.html

[toc] | [prev] | [next] | [standalone]


#4896

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2011-05-07 21:39 +1200
Message-ID<92kib3FgdcU2@mid.individual.net>
In reply to#4748
John Nagle wrote:

>     Such tuples are still identical, even if they
> contain identical references to immutable objects.

The point is you'd have to do the comparison only one
level deep, so it wouldn't be exactly the same as ==
on tuples.

-- 
Greg

[toc] | [prev] | [next] | [standalone]


#4712

FromMel <mwilson@the-wire.com>
Date2011-05-05 07:44 -0400
Message-ID<ipu2ib$ghl$1@speranza.aioe.org>
In reply to#4693
John Nagle wrote:
> On 5/4/2011 5:46 PM, harrismh777 wrote:
>> Or, as stated earlier, Python should not allow 'is' on immutable objects.
> 
>     A reasonable compromise would be that "is" is treated as "==" on
> immutable objects.

I foresee trouble testing among float(5), int(5), Decimal(5) ...

	Mel.

[toc] | [prev] | [next] | [standalone]


#4713

FromChris Angelico <rosuav@gmail.com>
Date2011-05-05 21:48 +1000
Message-ID<mailman.1187.1304596102.9059.python-list@python.org>
In reply to#4712
On Thu, May 5, 2011 at 9:44 PM, Mel <mwilson@the-wire.com> wrote:
> John Nagle wrote:
>> On 5/4/2011 5:46 PM, harrismh777 wrote:
>>> Or, as stated earlier, Python should not allow 'is' on immutable objects.
>>
>>     A reasonable compromise would be that "is" is treated as "==" on
>> immutable objects.
>
> I foresee trouble testing among float(5), int(5), Decimal(5) ...

Define 'x is y' as 'type(x)==type(y) and
isinstance(x,(int,float,tuple,etc,etc,etc)) and x==y' then.

Chris Angelico

[toc] | [prev] | [next] | [standalone]


#4721

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2011-05-05 13:59 +0000
Message-ID<4dc2ad5e$0$29991$c3e8da3$5496439d@news.astraweb.com>
In reply to#4713
On Thu, 05 May 2011 21:48:20 +1000, Chris Angelico wrote:

> On Thu, May 5, 2011 at 9:44 PM, Mel <mwilson@the-wire.com> wrote:
>> John Nagle wrote:
>>> On 5/4/2011 5:46 PM, harrismh777 wrote:
>>>> Or, as stated earlier, Python should not allow 'is' on immutable
>>>> objects.
>>>
>>>     A reasonable compromise would be that "is" is treated as "==" on
>>> immutable objects.
>>
>> I foresee trouble testing among float(5), int(5), Decimal(5) ...
> 
> Define 'x is y' as 'type(x)==type(y) and
> isinstance(x,(int,float,tuple,etc,etc,etc)) and x==y' then.

`is` is supposed to be a *fast* operator, not even slower than equality 
testing.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#4751

FromJohn Nagle <nagle@animats.com>
Date2011-05-05 08:58 -0700
Message-ID<4dc2c92f$0$10586$742ec2ed@news.sonic.net>
In reply to#4721
On 5/5/2011 6:59 AM, Steven D'Aprano wrote:
> On Thu, 05 May 2011 21:48:20 +1000, Chris Angelico wrote:
>
>> On Thu, May 5, 2011 at 9:44 PM, Mel<mwilson@the-wire.com>  wrote:
>>> John Nagle wrote:
>>>> On 5/4/2011 5:46 PM, harrismh777 wrote:
>>>>> Or, as stated earlier, Python should not allow 'is' on immutable
>>>>> objects.
>>>>
>>>>      A reasonable compromise would be that "is" is treated as "==" on
>>>> immutable objects.
>>>
>>> I foresee trouble testing among float(5), int(5), Decimal(5) ...
>>
>> Define 'x is y' as 'type(x)==type(y) and
>> isinstance(x,(int,float,tuple,etc,etc,etc)) and x==y' then.

    That's close to the right answer.
>
> `is` is supposed to be a *fast* operator, not even slower than equality
> testing.

    That's an implementation problem.  Those are cheap tests at the
machine code level.  An efficient test looks like this:

     def istest(a, b) :
         if id(a) == id(b) :	# the cheap address test
             return(True)
         if type(x) != type(y) :	# cheap binary comparison
	    return(False)
         if mutable(x) : 	# the interpreter knows this
             return(False)
         return(x == y)		# equality test for mutables

Probably about 12 machine instructions, and the full "==" test
is only reached for cases in which "is" now produces wrong answers.

It's encouraging that a Google code search finds no matches of

	if .* is \"
or
	if .* is 1

in Python code.

				John Nagle


	

[toc] | [prev] | [next] | [standalone]


#4719

FromNeil Cerutti <neilc@norwich.edu>
Date2011-05-05 13:19 +0000
Message-ID<92fmffFucoU9@mid.individual.net>
In reply to#4666
On 2011-05-04, John Nagle <nagle@animats.com> wrote:
> That's a quirk of CPython's boxed number implementation.   All
> integers are boxed, but there's a set of canned objects for
> small integers.  CPython's range for this is -5 to +256,
> incidentally.  That's visible through the "is" operator.
> Arguably, it should not be.

But that's the sole purpose of the is operator. You either expose
those details, or you don't have an is operator at all.

-- 
Neil Cerutti

[toc] | [prev] | [next] | [standalone]


#4771

FromTerry Reedy <tjreedy@udel.edu>
Date2011-05-05 14:39 -0400
Message-ID<mailman.1200.1304620785.9059.python-list@python.org>
In reply to#4719
On 5/5/2011 9:19 AM, Neil Cerutti wrote:
> On 2011-05-04, John Nagle<nagle@animats.com>  wrote:
>> That's a quirk of CPython's boxed number implementation.   All
>> integers are boxed, but there's a set of canned objects for
>> small integers.  CPython's range for this is -5 to +256,
>> incidentally.  That's visible through the "is" operator.
>> Arguably, it should not be.
>
> But that's the sole purpose of the is operator. You either expose
> those details, or you don't have an is operator at all.

Which is to say, the CPython testsuite has a CPython-specific 
implementation test that uses 'is' to test that implementation detail.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#4609

FromHans Georg Schaathun <hg@schaathun.net>
Date2011-05-04 11:56 +0100
Message-ID<gvn798-6tk.ln1@svn.schaathun.net>
In reply to#4605
On Wed, 4 May 2011 02:56:28 -0700 (PDT), Devin Jeanpierre
  <jeanpierreda@gmail.com> wrote:
:  Eh, that example doesn't say what you think it does. It has the same
:  behavior in C: http://ideone.com/Fq09N . Python is pass-by-value in a
:  meaningful sense, it's just that by saying that we say that the values
:  being passed are references/pointers.

No, Python is not pass-by-value, because the pointer is abstracted 
away.  You transmit arguments by reference only and cannot access the
value of the reference.  In C it is pass by value, as the pointer 
is explicit and do whatever you want with the pointer value.  

So, even though you have the same mechanism in C and Python, they
do not have the same name.  In the low-level C you only have pass
by value, but you can use the pointer syntax to do whatever you want
within pass by value.  In the higher-level python, you do not have 
the flexibility provided by explicit pointers, so you need to explain
the semantics without having a pointer concept defined a priori.

:                                        This is maybe one level of
:  abstraction below what's ideal, but Scheme, Java, etc. share this
:  terminology. (Ruby calls it pass-by-reference AFAIK. Whatever, a rose
:  by any other name...)

Now, this is confusing, because the terminology is not universal and
hardly intuitive.  What is called transmission by reference in a
Simula context (Bjørn Kirkerud's textbook on OO Programming with Simula
for instance) is called object sharing in Wikipedia.  What Wikipedia
calls call by reference is transmission by name in the Simula context.

-- 
:-- Hans Georg

[toc] | [prev] | [next] | [standalone]


#4612

FromDevin Jeanpierre <jeanpierreda@gmail.com>
Date2011-05-04 06:13 -0700
Message-ID<1874cca8-1f1f-4d0a-b306-c32f2fa1d8c1@x3g2000yqj.googlegroups.com>
In reply to#4609
On May 4, 6:56 am, Hans Georg Schaathun <h...@schaathun.net> wrote:
> On Wed, 4 May 2011 02:56:28 -0700 (PDT), Devin Jeanpierre  <jeanpierr...@gmail.com> wrote:
>
> :  Eh, that example doesn't say what you think it does. It has the same
> :  behavior in C:http://ideone.com/Fq09N. Python is pass-by-value in a
> :  meaningful sense, it's just that by saying that we say that the values
> :  being passed are references/pointers.
>
> No, Python is not pass-by-value, because the pointer is abstracted
> away.  You transmit arguments by reference only and cannot access the
> value of the reference.  In C it is pass by value, as the pointer
> is explicit and do whatever you want with the pointer value.  

The same argument applies to every language I know but two, all of
which describe themselves as pass-by-value. What you say certainly has
a consistency to it, it's just at odds with how I generally see the
term being applied. Forgive me if I don't share the same definition as
you, even if I do appreciate its elegance.

Devin Jeanpierre

[toc] | [prev] | [next] | [standalone]


#4651

Fromharrismh777 <harrismh777@charter.net>
Date2011-05-04 14:33 -0500
Message-ID<jShwp.18473$uh5.3681@newsfe02.iad>
In reply to#4609
Hans Georg Schaathun wrote:
> In C it is pass by value, as the pointer
> is explicit and do whatever you want with the pointer value.

You clearly are not a C programmer.

Most of my C data abstractions use dual circular linked lists of 
pointers to structures of pointers. *All* of that is only ever passed 
(at least in my programming) as references. My code almost never passes 
data by value.

We do not consider passing a pointer as *by value* because its an 
address; by definition, that is pass-by-reference. We are not passing 
the *value* of the data, we are passing the memory location (the 
reference) to the data. Pass by *value* on the other hand actually 
places the *value* of the data item on the call stack as a parameter.

Much of this conversation has more to do with semantics.


kind regards,
m harris



[toc] | [prev] | [next] | [standalone]


#4658

FromGrant Edwards <invalid@invalid.invalid>
Date2011-05-04 20:19 +0000
Message-ID<ipscbo$j6v$1@reader1.panix.com>
In reply to#4651
On 2011-05-04, harrismh777 <harrismh777@charter.net> wrote:
> Hans Georg Schaathun wrote:

>> In C it is pass by value, as the pointer is explicit and do whatever
>> you want with the pointer value.
>
> You clearly are not a C programmer.
>
> Most of my C data abstractions use dual circular linked lists of 
> pointers to structures of pointers. *All* of that is only ever passed
> (at least in my programming) as references. My code almost never
> passes data by value.
>
> We do not consider passing a pointer as *by value* because its an 
> address; by definition, that is pass-by-reference.

No, it isn't.  It's pass by value.  The fact that you are passing a
value that is a pointer to another value is not relevent.

Pass by reference means that if I call

  foo(x)

And foo looks like this:

  foo(param)
    param = 4

Then 'x' in the caller's namespace ends up set to 4.    

> We are not passing the *value* of the data, we are passing the memory
> location (the reference) to the data.

You're pass a value.  That value is a pointer to some other value.

> Pass by *value* on the other hand actually places the *value* of the
> data item on the call stack as a parameter.

C is pass by value.

if I call foo(x)

And this is foo:

void foo (float param)
{
  param = 1.23
}

The value of x in the caller's namespace is not changed.  If C used
pass by reference, x would change.

-- 
Grant Edwards               grant.b.edwards        Yow! SHHHH!!  I hear SIX
                                  at               TATTOOED TRUCK-DRIVERS
                              gmail.com            tossing ENGINE BLOCKS into
                                                   empty OIL DRUMS ...

[toc] | [prev] | [next] | [standalone]


#4661

Fromharrismh777 <harrismh777@charter.net>
Date2011-05-04 16:35 -0500
Message-ID<WEjwp.18479$uh5.14097@newsfe02.iad>
In reply to#4658
Grant Edwards wrote:
>> We do not consider passing a pointer as*by value*  because its an
>> >  address; by definition, that is pass-by-reference.
> No, it isn't.  It's pass by value.  The fact that you are passing a
> value that is a pointer to another value is not relevent.
>

@ Edwards, &Schaathun

You are most definitely mistaken.   See:

http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr233.htm


I understand that semantically some people insist that when C receives 
parms as pointers that pass-by-reference is only being simulated.

But that is the silliness of this argument... because down in the guts 
of the ALU we only have direct and indirect memory addressing. Period.

You either pass a function the memory directly (value) or you pass the 
data indirectly (reference).

Everything above that is high-level semantics.


If I want to pass values to my C functions, I can.  If I want to pass 
references to my C functions, I can.

If I want to implement a C language that does not use pointers directly 
(hides them) I can implement pass by reference completely (on the 
surface). In fact, I can implement the C compiler so that pass by value 
is not allowed! [ it wouldn't look much like C, but its do-able ]


Everyone forgets that their high-level language is not 'really' what's 
working...   gcc does not produce machine code... it produces assembler 
instructions that are passed to a translator... you can interrupt the 
process and have it produce the assembly instructions so you can see 
them if you want to...  the point being, after all is said and done, all 
you can do with today's von Neumann processors is pass data directly 
(value) or indirectly (reference).

Everything else is semantics.

[toc] | [prev] | [next] | [standalone]


#4668

FromGrant Edwards <invalid@invalid.invalid>
Date2011-05-04 21:57 +0000
Message-ID<ipsi49$cb5$1@reader1.panix.com>
In reply to#4661
On 2011-05-04, harrismh777 <harrismh777@charter.net> wrote:
> Grant Edwards wrote:
>>> We do not consider passing a pointer as*by value*  because its an
>>> >  address; by definition, that is pass-by-reference.
>> No, it isn't.  It's pass by value.  The fact that you are passing a
>> value that is a pointer to another value is not relevent.
>>
>
> @ Edwards, &Schaathun
>
> You are most definitely mistaken.

The "pass by value" and "pass by reference" parameter passing
mechanisms are pretty well defined, and C uses "pass by value".

> I understand that semantically some people insist that when C
> receives parms as pointers that pass-by-reference is only being
> simulated.

And they are right.

> If I want to pass values to my C functions, I can.  If I want to pass 
> references to my C functions, I can.

We're not talking about what _you_ do. We're talking about what the C
_compiler_ does.  The C compiler passes by value -- always.

> If I want to implement a C language that does not use pointers directly 
> (hides them) I can implement pass by reference completely (on the 
> surface).

That wouldn't be C.

> In fact, I can implement the C compiler so that pass by value is not
> allowed! [ it wouldn't look much like C, but its do-able ]

If you don't pass by value, it's not a C compiler.

> Everyone forgets that their high-level language is not 'really'
> what's working...  gcc does not produce machine code... it produces
> assembler instructions that are passed to a translator... you can
> interrupt the process and have it produce the assembly instructions
> so you can see them if you want to...  the point being, after all is
> said and done, all you can do with today's von Neumann processors is
> pass data directly (value) or indirectly (reference).

I have no idea what your point is.

At the machine level, there _is_ nothing but values.  You can use a
value as an integer, or as a pointer.  It's still just a value.  But
we're talking about parameter passing mechanisms defined by high-level
language specifications -- particularly C.

-- 
Grant Edwards               grant.b.edwards        Yow! It was a JOKE!!
                                  at               Get it??  I was receiving
                              gmail.com            messages from DAVID
                                                   LETTERMAN!!  !

[toc] | [prev] | [next] | [standalone]


#4680

Fromharrismh777 <harrismh777@charter.net>
Date2011-05-04 20:11 -0500
Message-ID<GOmwp.13554$Vp.9996@newsfe14.iad>
In reply to#4668
Grant Edwards wrote:
> The "pass by value" and "pass by reference" parameter passing
> mechanisms are pretty well defined, and C uses "pass by value".

Yeah, that's kind-a funny, cause I'm one of the guys (old farts) that 
helped define them....


The problem you're having here is that you're thinking of parameter 
passing 'mechanisms' and not focusing on the definition of the terms.

A reference is a pointer (an address).

A value is memory (not an address).


These definitions go all the way back before the 8080, or the 6502, 8 
bit processors. Pass by reference has 'always' meant pass by using a 
memory address (indirect addressing);  a reference has always been a 
memory pointer.


If I call a function in C, and pass-by-value, the data's 'value' is 
placed on the stack in a stack-frame, as a 'value' parm... its a copy of 
the actual data in memory.

If I call a function in C, and pass-by-reference, the data's 'address' 
is placed on the stack in a stack-frame, as a 'reference' parm... no 
data is copied and the function must de-reference the pointer to get to 
the data....   this is by definition.



There may be some language somewhere that does pass-by-reference which 
is not implemented under the hood as pointers, but I can't think of 
any...   'cause like I've been saying, way down under the hood, we only 
have direct and indirect memory addressing in today's processors. EOS.

If you pass a parm, you can either pass a copy (value) or pass a 
reference to its location (not a copy, a reference).


kind regards,
m harris



[toc] | [prev] | [next] | [standalone]


#4683

FromMark Hammond <mhammond@skippinet.com.au>
Date2011-05-05 12:09 +1000
Message-ID<mailman.1179.1304561358.9059.python-list@python.org>
In reply to#4680
On 5/05/2011 11:11 AM, harrismh777 wrote:

>> The "pass by value" and "pass by reference" parameter passing
>> mechanisms are pretty well defined, and C uses "pass by value".
>
> Yeah, that's kind-a funny, cause I'm one of the guys (old farts) that helped define them....

Cool - please tell us more about your involvement in that.  Obviously 
lots of people were in the industry then, but only a select few would be 
able to claim they helped define those terms.

> There may be some language somewhere that does pass-by-reference which
> is not implemented under the hood as pointers, but I can't think of
> any... 'cause like I've been saying, way down under the hood, we only
> have direct and indirect memory addressing in today's processors. EOS.

What about Python, where passing an integer to a function passes a 
pointer to an int object, but that function is able to change the value 
of the variable locally without changing the passed object (indeed, it 
is impossible to change the passed integer)?

So given the definitions above, Python uses a by-reference mechanism but 
(in some cases) has by-value semantics.

While I understand exactly how things work (so don't need an 
explanation), the point is that for anything close to a high-level 
language, things aren't as black and white as they are for the low-level 
languages...

Mark

[toc] | [prev] | [next] | [standalone]


#4691

Fromharrismh777 <harrismh777@charter.net>
Date2011-05-04 23:01 -0500
Message-ID<dipwp.10405$Du7.8464@newsfe04.iad>
In reply to#4683
Mark Hammond wrote:
> What about Python, where passing an integer to a function passes a
> pointer to an int object, but that function is able to change the value
> of the variable locally without changing the passed object (indeed, it
> is impossible to change the passed integer)?
>
> So given the definitions above, Python uses a by-reference mechanism but
> (in some cases) has by-value semantics.

    Yeah, Mark, the trouble is that the concepts (by-value, or 
by-reference) have morphed into a concept(s) that say something of what 
should or should not happen within scopes (or, in the case of Python, 
namespaces) and says something less about what 'reference' or 'value' 
mean as terms for data. So, again, its semantics... not black and white, 
as you say and some of both|and.

    If C were 'strictly' pass-by-value (that is what the K&R states, 
sec. 1.8, p27 2nd ed) and had no concept of indirect memory addressing 
(memory references is what we called them in the early days ca. 1970~) 
in the form of pointers, then all of this semantic discussion would be 
mute. But, 'C' does provide for pointers which are used by all 'C' 
programmers to firmly provide pass-by-reference in their coding (C++ 
also, by the way). My 'C' functions can most definitely modify the parms 
passed in from their calling functions by simply 'de-referencing' the 
parms. This is done all the time--- and a good thing too, since nobody 
would want to pass a list by value, or worse yet a linked list with a 
couple of thousand nodes, by value.

    So, I argue that its silly to say that because the parameter passing 
'mechanism' of the 'C' language is pass-by-value (see K&R) that 'C' is a 
pass-by-value language, when clearly 'C' programmers use 
pass-by-reference routinely in their 'C' coding. This is quite different 
than some flavors of Fortran or Pascal where the called routines had 
access to the original vars--- which had more to do with scope than it 
did with parameter passing or indirection. In 'C' if I want to I can 
live with pass-by-value... or, I can live with pass-by-reference 
nicely... and its up to me... not language constraints. Again, it seems 
that some folks want to pigeon hole this concept into one or the other 
(and it clearly can be) but usually it is a combination of the two (both 
| and).

kind regards,
m harris

[toc] | [prev] | [next] | [standalone]


#4709

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2011-05-05 22:19 +1200
Message-ID<92fbt9FfooU1@mid.individual.net>
In reply to#4691
harrismh777 wrote:
> 'C' does provide for pointers which are used by all 'C' 
> programmers to firmly provide pass-by-reference in their coding

Yes, but when they do that, they're building an abstraction
of their own on top of the facilities provided by the C
language. C itself has no notion of pass-by-reference. If
it did, the programmer would be able to use it directly
instead of having to insert & and * operators himself.

-- 
Greg

[toc] | [prev] | [next] | [standalone]


Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9  Next page →

Back to top | Article view | comp.lang.python


csiph-web