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


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

Python was designed (was Re: Multi-threading in Python vs Java)

Started byChris Angelico <rosuav@gmail.com>
First post2013-10-13 09:37 +1100
Last post2013-10-26 22:31 +0100
Articles 20 on this page of 143 — 27 participants

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


Contents

  Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-13 09:37 +1100
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-13 03:38 +0000
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-13 15:34 +1100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Roy Smith <roy@panix.com> - 2013-10-13 09:04 -0400
        Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-14 03:39 -0700
    Re: Python was designed (was Re: Multi-threading in Python vs Java) John Nagle <nagle@animats.com> - 2013-10-14 12:18 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-15 09:43 +1100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-15 10:11 +1100
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve@pearwood.info> - 2013-10-15 08:50 +0000
          Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-15 08:48 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-14 18:31 -0700
        Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-14 20:02 -0700
          Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-15 13:26 -0700
            Re: Python was designed (was Re: Multi-threading in Python vs Java) Grant Edwards <invalid@invalid.invalid> - 2013-10-15 21:46 +0000
              Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-16 10:45 -0700
                Re: Python was designed (was Re: Multi-threading in Python vs Java) Grant Edwards <invalid@invalid.invalid> - 2013-10-16 18:42 +0000
            Re: Python was designed (was Re: Multi-threading in Python vs Java) "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2013-10-15 23:01 +0100
              Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-15 21:45 -0700
              Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-16 10:57 -0700
                Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-16 11:25 -0700
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Skip Montanaro <skip@pobox.com> - 2013-10-16 13:49 -0500
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-17 07:40 +1100
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-16 17:13 -0700
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-17 11:28 +1100
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Ned Batchelder <ned@nedbatchelder.com> - 2013-10-16 20:47 -0400
                    Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-16 18:30 -0700
                      Re: Python was designed (was Re: Multi-threading in Python vs Java) Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-10-17 11:20 +0300
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-16 17:53 -0700
                    Re: Python was designed Piet van Oostrum <piet@vanoostrum.org> - 2013-10-16 22:33 -0400
                    Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve@pearwood.info> - 2013-10-17 05:24 +0000
                    Re: Python was designed (was Re: Multi-threading in Python vs Java) Grant Edwards <invalid@invalid.invalid> - 2013-10-17 13:43 +0000
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-17 12:01 +1100
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Ned Batchelder <ned@nedbatchelder.com> - 2013-10-16 22:09 -0400
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-17 08:02 +0100
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-17 07:49 -0700
                    Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-18 01:52 +0000
                      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-17 19:08 -0700
                        Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-17 20:34 -0700
                        Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-18 03:56 +0000
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-18 02:00 +1100
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-17 16:00 +0100
                Re: Python was designed (was Re: Multi-threading in Python vs Java) Grant Edwards <invalid@invalid.invalid> - 2013-10-16 18:44 +0000
                Re: Python was designed (was Re: Multi-threading in Python vs Java) alex23 <wuwei23@gmail.com> - 2013-10-17 10:26 +1000
            Re: Python was designed Piet van Oostrum <piet@vanoostrum.org> - 2013-10-15 23:20 -0400
            Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-15 20:53 -0700
            Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-17 10:32 -0700
              Re: Python was designed (was Re: Multi-threading in Python vs Java) MRAB <python@mrabarnett.plus.com> - 2013-10-17 18:44 +0100
                Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-17 20:15 -0700
              Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-17 19:08 +0100
              Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-17 12:49 -0700
              Re: Python was designed (was Re: Multi-threading in Python vs Java) Ned Batchelder <ned@nedbatchelder.com> - 2013-10-17 16:57 -0400
              Re: Python was designed (was Re: Multi-threading in Python vs Java) Ethan Furman <ethan@stoneleaf.us> - 2013-10-17 15:10 -0700
              Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-17 18:59 -0700
                Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-18 02:57 +0000
          Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-15 23:48 +0100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Terry Reedy <tjreedy@udel.edu> - 2013-10-14 21:35 -0400
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Roy Smith <roy@panix.com> - 2013-10-14 21:50 -0400
          Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-15 08:21 +0100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-15 12:48 +1100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Janssen <dreamingforward@gmail.com> - 2013-10-14 19:11 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-15 13:19 +1100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-15 03:18 +0000
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-15 14:29 +1100
        Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-14 20:48 -0700
          Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve@pearwood.info> - 2013-10-15 05:51 +0000
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-10-15 09:48 +0200
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-15 19:57 +1100
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-15 15:01 +0000
          Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-16 06:09 +1100
          Re: Python was designed (was Re: Multi-threading in Python vs Java) Tim Chase <python.list@tim.thechases.com> - 2013-10-15 16:17 -0500
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-10-15 12:26 +0200
      Re: Python was designed (was Re: Multi-threading in Python vs Java) wxjmfauth@gmail.com - 2013-10-15 13:11 -0700
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-15 22:00 +0100
          Re: Python was designed (was Re: Multi-threading in Python vs Java) wxjmfauth@gmail.com - 2013-10-24 23:14 -0700
            Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 19:05 +0100
              Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-26 04:46 +0000
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-14 14:11 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-14 22:43 +0100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-15 09:45 +1100
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-15 17:18 -0700
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-16 23:49 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-17 18:15 +1100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-17 05:39 -0700
        Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-17 06:00 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Terry Reedy <tjreedy@udel.edu> - 2013-10-17 16:15 -0400
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-17 21:41 +0100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-18 03:14 +0000
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-18 15:12 +1100
          Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-18 04:45 +0000
            Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-18 15:53 +1100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-19 09:57 +0000
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-19 21:49 +1100
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-17 00:23 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Christian Gollwitzer <auriocus@gmx.de> - 2013-10-17 09:42 +0200
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-17 19:24 +1100
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-18 01:58 +0000
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Piet van Oostrum <piet@vanoostrum.org> - 2013-10-17 12:58 -0400
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-17 12:37 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Roy Smith <roy@panix.com> - 2013-10-17 20:01 -0400
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-18 11:09 +1100
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-17 13:54 -0700
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-18 13:32 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-18 21:41 +0100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-18 22:26 -0700
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-19 16:35 +1100
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-21 02:07 +0000
          Re: Python was designed (was Re: Multi-threading in Python vs Java) Roy Smith <roy@panix.com> - 2013-10-20 22:21 -0400
            Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-20 21:44 -0700
          Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-21 17:56 +1100
            Re: Python was designed (was Re: Multi-threading in Python vs Java) Roy Smith <roy@panix.com> - 2013-10-21 09:05 -0400
              Re: Python was designed (was Re: Multi-threading in Python vs Java) Lele Gaifax <lele@metapensiero.it> - 2013-10-22 09:38 +0200
                Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve@pearwood.info> - 2013-10-23 08:16 +0000
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Ned Batchelder <ned@nedbatchelder.com> - 2013-10-23 06:36 -0400
                    Re: Python was designed (was Re: Multi-threading in Python vs Java) Grant Edwards <invalid@invalid.invalid> - 2013-10-23 14:21 +0000
                  Re: Python was designed (was Re: Multi-threading in Python vs Java) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-10-24 00:31 +1300
                    Re: Python was designed (was Re: Multi-threading in Python vs Java) Lele Gaifax <lele@metapensiero.it> - 2013-10-23 17:56 +0200
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-18 13:56 -0700
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-20 23:44 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-21 18:01 +1100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-21 08:27 +0100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-21 18:31 +1100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-21 08:39 +0100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-21 18:43 +1100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-21 09:11 +0100
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve@pearwood.info> - 2013-10-21 08:24 +0000
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Metallicow <metaliobovinus@gmail.com> - 2013-10-21 01:39 -0700
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-21 01:43 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Metallicow <metaliobovinus@gmail.com> - 2013-10-21 02:17 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-21 05:50 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-22 02:29 +0000
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Skip Montanaro <skip@pobox.com> - 2013-10-22 07:02 -0500
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Metallicow <metaliobovinus@gmail.com> - 2013-10-23 22:31 -0700
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-21 19:55 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) rusi <rustompmody@gmail.com> - 2013-10-21 20:19 -0700
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-22 17:13 +1100
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-22 00:51 -0700
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-25 01:12 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-26 06:19 +0000
        Re: Python was designed (was Re: Multi-threading in Python vs Java) Chris Angelico <rosuav@gmail.com> - 2013-10-26 17:36 +1100
      Re: Python was designed Paul Rubin <no.email@nospam.invalid> - 2013-10-26 10:36 -0700
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-25 23:59 -0700
    Re: Python was designed (was Re: Multi-threading in Python vs Java) Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-26 12:24 -0700
      Re: Python was designed (was Re: Multi-threading in Python vs Java) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-26 22:31 +0100

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


#56991

FromPeter Cacioppi <peter.cacioppi@gmail.com>
Date2013-10-17 13:54 -0700
Message-ID<7ce541a3-e69a-4da1-a5e5-28fbe4f42754@googlegroups.com>
In reply to#56759
My bad, Python is dynamically typed, but also strongly typed.

But I still say it has language features that specifically support polymorphism, which is why true OO can be developed in Python in a readable way.

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


#57077

FromPeter Cacioppi <peter.cacioppi@gmail.com>
Date2013-10-18 13:32 -0700
Message-ID<0a9761bd-4f1c-48a9-a3c5-9424f2e99f2e@googlegroups.com>
In reply to#56759
> I think the author goes a little too far to claim that "strong"
> "weak" are meaningless terms when it comes to type systems

I can live with that, actually.

The important language classifications are more along the lines of static vs. dynamic typing, procedural vs. functional, no objects vs. object based vs. true OO.

That probably starts another flame war, but this thread is already running around with its hair on fire.

I still say that object-based is a distinct and meaningful subset of object-oriented programming. The former can be implemented elegantly in a wide range of languages without much in the way of specific language support, the latter needs to designed into the language to allow a modicum of polymorhpic readability.

It's an important distinction, because a project that is constrained to C should (IMHO) target an object-based design pattern but not an object-oriented one. That said, I'm open to disputation-by-example on this point, provided the example is reasonably small and pretty. (If the only polymorphic C code is ugly and non-small, it sort of proves my point).

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


#57078

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-10-18 21:41 +0100
Message-ID<mailman.1244.1382128942.18130.python-list@python.org>
In reply to#57077
On 18/10/2013 21:32, Peter Cacioppi wrote:
>> I think the author goes a little too far to claim that "strong"
>> "weak" are meaningless terms when it comes to type systems
>
> I can live with that, actually.
>
> The important language classifications are more along the lines of static vs. dynamic typing, procedural vs. functional, no objects vs. object based vs. true OO.
>
> That probably starts another flame war, but this thread is already running around with its hair on fire.
>
> I still say that object-based is a distinct and meaningful subset of object-oriented programming. The former can be implemented elegantly in a wide range of languages without much in the way of specific language support, the latter needs to designed into the language to allow a modicum of polymorhpic readability.
>
> It's an important distinction, because a project that is constrained to C should (IMHO) target an object-based design pattern but not an object-oriented one. That said, I'm open to disputation-by-example on this point, provided the example is reasonably small and pretty. (If the only polymorphic C code is ugly and non-small, it sort of proves my point).
>
>

As far as I'm concerned all of the above belongs on 
comp.theoretical.claptrap, give me practicality beats purity any day of 
the week :)

-- 
Roses are red,
Violets are blue,
Most poems rhyme,
But this one doesn't.

Mark Lawrence

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


#57086

Fromrusi <rustompmody@gmail.com>
Date2013-10-18 22:26 -0700
Message-ID<7b1b5852-a213-4a45-bb9b-2a840c183a57@googlegroups.com>
In reply to#57077
On Saturday, October 19, 2013 2:02:24 AM UTC+5:30, Peter Cacioppi wrote:
> 
> I still say that object-based is a distinct and meaningful subset of
> object-oriented programming.

Yes that is what is asserted by
http://www-public.int-evry.fr/~gibson/Teaching/CSC7322/ReadingMaterial/Wegner87.pdf 
-- a classic though old reference

> The former can be implemented elegantly in a wide range of languages without much in the way of specific language support, the latter needs to designed into the language to allow a modicum of polymorhpic readability.

3 examples were given (1) python's C implementation (2) OS/2 (3) Linux kernel
About 2 I dont know anything though I believe gdk and gobject are more contemporary examples.

About 1 I have reservations -- see below

IMO the linux kernel is the closest approx to what you are asking:
The details are here http://lwn.net/Articles/444910/
The top level summary is in the opening paras of
http://lwn.net/Articles/446317/
 
> It's an important distinction, because a project that is constrained to C 
> should (IMHO) target an object-based design pattern but not an 
> object-oriented one. That said, I'm open to disputation-by-example on this 
> point, provided the example is reasonably small and pretty. (If the only 
> polymorphic C code is ugly and non-small, it sort of proves my point).

Yes this is an important point though hard to argue in a definitive way -- I call such arguments philosophical rather than scientific; ie it is important but it cant really be settled once and for all.

To see this one can start with two extremes:
Extreme 1: Computability (aka Turing) theory. From this pov every language/system/computer is equivalent to every other and people designing 'newer' and 'better' ones are wasting their's and other's time just like fashion designers who keep alternating pant-hems from Elvis Presley to narrow.

Extreme 2: Semicolon as separator differs from semicolon as terminator;
P4 processor is different from P2 etc etc -- essentially treating any difference as a substantive difference.

Clearly both extremes are unsatisfactory: the first lands us into the Turing-tarpit. The second makes a discussion of close-but-different impossible.

Just as the study of algorithms arose out of a desire to study program efficiency but with the nitty-gritty details of machines abstracted away, in the same way programming language semantics arose in order to study broad classes of languages with details hidden away.

Unfortunately, even after 50 years of trying, semantics has been a dismal failure in defining the what and where and whither of OOP.
In a sane world this would have signified that perhaps OOP as a concept(s) needs to be questioned.
Considering that the opposite has happened -- programming language semantics as an area has become distinctly 'old-fashioned' and not-so-respectable-- I can only conclude that the world is not sane.

Well the tide is slowly turning -- here's a growing bunch of people questioning the validity of OOP:
http://en.wikipedia.org/wiki/Object-oriented_programming#Criticism

Of these I find two noteworthy:
1. Stepanov who is next to Stroustrup in C++ circles, calls OOP a hoax.
2. Carnegie Mellon university has eliminated OOP as "unsuitable for a modern CS curriculum"

And which is why I sympathize with Mark Janssen's passion to clean up the OOP act.

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


#57087

FromChris Angelico <rosuav@gmail.com>
Date2013-10-19 16:35 +1100
Message-ID<mailman.1250.1382160952.18130.python-list@python.org>
In reply to#57086
On Sat, Oct 19, 2013 at 4:26 PM, rusi <rustompmody@gmail.com> wrote:
> 3 examples were given (1) python's C implementation (2) OS/2 (3) Linux kernel
> About 2 I dont know anything though I believe gdk and gobject are more contemporary examples.

Good point, I believe you're right there. I haven't worked with
GTK/GDK in C, but when poking around the docs to work out how to use
them in Python or Pike, I've seen something of how it's done. And yes,
they're polymorphic and properly object oriented.

ChrisA

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


#57163

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-10-21 02:07 +0000
Message-ID<52648c54$0$29981$c3e8da3$5496439d@news.astraweb.com>
In reply to#57086
On Fri, 18 Oct 2013 22:26:02 -0700, rusi wrote:

> On Saturday, October 19, 2013 2:02:24 AM UTC+5:30, Peter Cacioppi wrote:
>> 
>> I still say that object-based is a distinct and meaningful subset of
>> object-oriented programming.
> 
> Yes that is what is asserted by
> http://www-public.int-evry.fr/~gibson/Teaching/CSC7322/ReadingMaterial/
Wegner87.pdf
> -- a classic though old reference

The truth of a definition is not really something that is amenable to 
proof, only to agreement. In my experience, there is no widespread 
agreement on what the terms "object oriented" or "object based" 
programming mean. I expect that most people would consider them synonyms, 
or might consider the first to have some vigorous meaning while the 
second is just an informal term for a language that in some sense is 
based on objects in some way.

Even if we agreed that there was a distinction between the two -- and I 
don't think we do -- there is certainly no agreement as to what that 
distinction actually is. There are far too many mediocre programmers with 
limited experience outside of their narrow field who assume that whatever 
sliver of C++/Java/Python/whatever that they learned is the One True 
Definition of object-oriented programming. And too many academics looking 
for hard boundaries between concepts which, fundamentally, exist in a 
continuum.

It's all just part of the human tendency to pigeon-hole. According to 
some, Java, which has many low-level machine primitive types, is an 
object-oriented language, while Python, which has no machine primitives 
and where every value is an object, is not. Explain that one, if you can.



[...]
>> It's an important distinction, because a project that is constrained to
>> C should (IMHO) target an object-based design pattern but not an
>> object-oriented one. That said, I'm open to disputation-by-example on
>> this point, provided the example is reasonably small and pretty. (If
>> the only polymorphic C code is ugly and non-small, it sort of proves my
>> point).

Define ugly :-)

One of the reasons multiple languages exist is because people find that 
useful programming idioms and styles are *hard to use* or "ugly" in some 
languages, so they create new languages with different syntax to make 
those useful patterns easier to use. But syntax is not everything. 
Whether you write:

object.method(arg)    // Python, VB, Ruby, Java
object#method arg     // OCaml
object:method arg     // Lua
method object arg     // Haskell, Mercury
object method arg     // Io
object->method(arg)   // C++, PHP
method(object, arg)   // Ada, Dylan
send method(arg) to object  // XTalk family of languages


etc. does not really change the fact that you are calling a method on an 
object, despite the change in syntax. Even Forth has frameworks that let 
you write object-[oriented|based] code using a stack and reverse Polish 
notation syntax.


[...]
> Just as the study of algorithms arose out of a desire to study program
> efficiency but with the nitty-gritty details of machines abstracted
> away, in the same way programming language semantics arose in order to
> study broad classes of languages with details hidden away.

I don't think that programming language semantics arose so much in order 
to *study* languages, more to *program*. Programming languages pre-date 
the study of programming languages :-)


> Unfortunately, even after 50 years of trying, semantics has been a
> dismal failure in defining the what and where and whither of OOP. In a
> sane world this would have signified that perhaps OOP as a concept(s)
> needs to be questioned. Considering that the opposite has happened --
> programming language semantics as an area has become distinctly
> 'old-fashioned' and not-so-respectable-- I can only conclude that the
> world is not sane.

All the words are in English, yet somehow I can't quite make sense of 
this paragraph. You seem to be using "semantics" in a way that doesn't 
quite make sense to me. To me, "programming language semantics" is the 
*meaning* of code: "var = func(arg)" is the syntax, "call func with arg 
and assign the result to var" is the semantics. What do you mean by it?


> Well the tide is slowly turning -- here's a growing bunch of people
> questioning the validity of OOP:
> http://en.wikipedia.org/wiki/Object-oriented_programming#Criticism

*Criticism* is not the same as questioning the validity. Certainly I can 
criticise OOP:

- if you care about machine efficiency, shoving small ints into a bulky 
object wrapper is bad for machine efficiency;

- ravioli code is to OOP as spaghetti code was to BASIC;

- large, deep object hierarchies are complex and hard to understand and 
learn;

etc. But then I can also criticise functional programming, declarative 
programming, imperative programming, logic programming, etc. There is no 
One True Programming Paradigm suitable for every task, just as there is 
no One True Programming Language.

 
> Of these I find two noteworthy:
> 1. Stepanov who is next to Stroustrup in C++ circles, calls OOP a hoax.
> 2. Carnegie Mellon university has eliminated OOP as "unsuitable for a
> modern CS curriculum"

I can't imagine what Stepanov means by calling OOP a hoax. It certainly 
exists. The fact that he equates it with AI as a hoax speaks more about 
him than about OOP -- AI is quietly and without fanfare changing the 
world. It's not just showy, high-profile stuff like the fact that the 
best chess masters in the world are now machines, but little stuff, often 
astonishingly important, that people don't necessarily associate with AI:

- autonomous weapons
- natural language parsing
- speech recognition
- data mining

etc. I think what happens is that whenever AI leads to progress, some 
people redefine that area as "not AI". Or they presume that anything less 
than HAL or 3-CPO means AI is a failure.

As far as Carnegie Mellon University, in isolation that doesn't say much. 
It could mean that they've decided to shift to more academically 
fashionable languages, like Mercury and Haskell; or it could mean that 
they've decided that the business of "a modern CS curriculum" is to churn 
out as many half-trained PHP monkeys as possible. (Substitute Java for 
PHP, and that's the philosophy of a lot of CS departments.)

Sure enough, reading the quote in full, the answer is that they've 
shifted to teaching functional languages, which is great for academic 
rigor and not so great for either programmer productivity or machine 
efficiency.


-- 
Steven

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


#57164

FromRoy Smith <roy@panix.com>
Date2013-10-20 22:21 -0400
Message-ID<roy-E35730.22211220102013@news.panix.com>
In reply to#57163
In article <52648c54$0$29981$c3e8da3$5496439d@news.astraweb.com>,
 Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:

> According to 
> some, Java, which has many low-level machine primitive types, is an 
> object-oriented language, while Python, which has no machine primitives 
> and where every value is an object, is not. Explain that one, if you can.

That's easy to explain.  Python doesn't have private data, therefore it 
isn't OO.  Well, according to the Java-esque gospel, at any rate.

Whenever somebody tells you what OO means, ask him what part of the 
elephant he's touching.

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


#57169

Fromrusi <rustompmody@gmail.com>
Date2013-10-20 21:44 -0700
Message-ID<a9dd87e1-8391-4751-ad4b-a5ed081380c7@googlegroups.com>
In reply to#57164
On Monday, October 21, 2013 7:51:12 AM UTC+5:30, Roy Smith wrote:
> In article 
>  Steven D'Aprano  wrote:
> 
> > According to 
> > some, Java, which has many low-level machine primitive types, is an 
> > object-oriented language, while Python, which has no machine primitives 
> > and where every value is an object, is not. Explain that one, if you can.
>  
> That's easy to explain.  Python doesn't have private data, therefore it 
> isn't OO.  Well, according to the Java-esque gospel, at any rate.
>
> Whenever somebody tells you what OO means, ask him what part of the 
> elephant he's touching.

Nice one ! Complementarily one can ask what does a typical Picasso cubist painting eg http://www.artchive.com/artchive/p/picasso/cadaques.jpg
represent? The avant gardists will wax eloquent.
And some (of us philistines) will of course say: Nothing.
Just as there may an elephant which we are too blind to see, its good to keep in mind the possibility that there may be big words without anything actually there.

Colloquially known as the emperor's new clothes

On Monday, October 21, 2013 7:37:17 AM UTC+5:30, Steven D'Aprano wrote:
> > Unfortunately, even after 50 years of trying, semantics has been a
> > dismal failure in defining the what and where and whither of OOP. In a
> > sane world this would have signified that perhaps OOP as a concept(s)
> > needs to be questioned. Considering that the opposite has happened --
> > programming language semantics as an area has become distinctly
> > 'old-fashioned' and not-so-respectable-- I can only conclude that the
> > world is not sane.
>  
> All the words are in English, yet somehow I can't quite make sense of
> this paragraph. You seem to be using "semantics" in a way that doesn't
> quite make sense to me. To me, "programming language semantics" is the
> *meaning* of code: "var = func(arg)" is the syntax, "call func with arg
> and assign the result to var" is the semantics. What do you mean by it?

Yes its always good to be skeptical about the emperor's new clothes…

I thought I'd point to wikipedia http://en.wikipedia.org/wiki/Semantics_%28computer_science%29 but its doing a less than stellar job of it so heres my thoughts:


Programming language semantics categorises roughly into:
1. Operational
2. Denotational
3. Axiomatic
4. Algebraic

Some historical context:

1. proof theory vs model theory

In logic, the proof theorists want to study how to prove or reason about something
The model theorists, more platonically inclined, want to say what something is
Corresponds to the philosophical divide between epistemology and ontology/metaphysics.
The latter can be more 'grand' but is therefore subject to the most penetrating criticism.
Historically the big contributions of Aristotle and Plato were under the title of metaphysics and the big contributions of Kant and Hume were to show that for the most part metaphysics is bullshit.
In short these kinds of arguments are a bit older than you and me!!

In programming language research, the model-theorists end towards denotational semantics;
the proof theorists tend towards axiomatic and algebraic semantics;
The implementers come from the operational camp

2. programs ∈ languages

> To me, "programming language semantics" is the *meaning* of code.

Yes this is an eminently sensible pov (and has precedents like Hoare, Dijkstra, Floyd etc -- the 'axiomatic' guys). However you cannot really talk of the meaning of programs without talking of the meaning of programming languages. Clearly this -- the meaning of the language -- is a grander project and just as in philosophy, is as liable to called out as bullshit.  As an example the repeating argument about what IS a variable indicates the crying need to discuss this more metaphysically -- ie denotational semantically -- because if we dont, the result is just a mess

- in C a variable *means* this
- in python it means that
- in math it means something
- etc

> But then I can also criticise functional programming, declarative programming,
> imperative programming, logic programming, etc. There is no One True Programming 
> Paradigm suitable for every task, just as there is no One True Programming Language.

Analogy:

When we deal with an existing code-base, we often find flaws/issues/gaffes/whatever in the design or architecture.  On the other hand sometimes we find there is no design or architecture whatever
I believe there is a big difference between the two.  In PLs think php.

I think what Stepanov is saying (and most of the others at http://en.wikipedia.org/wiki/Object-oriented_programming#Criticism ) is this distinction.

My own view in summary: Between programming and mathematics, mathematics is the prior.  This is obviously true as history including the name 'computer' and all its modifications. To the extent that "ontogeny recapitulates phylogeny" this is true in fact as well.

The OOP aficionados are straining to break their umbilical cord with X. That X may -- depending on context/background -- be called math, logic, theory, philosophy, semantics, academics etc etc.
That name is less relevant than the lack of consideration: Where will our sustenance come from?

And I am reminded of Mark Twain:
------
When I was 13 years old I thought my father an utter fool. When I became 21 I was amazed at how much the old man had learnt in 8 years.
------

Do you want to make a date for opening this discussion again after 8 years <wink>??

Here's my side of the bet: OOP will be as respectable in 2021 as the goto is today?

Saying which reminds me of a personal memory. My teacher of programming once told me:
What the goto does to control structure, the assignment does to data structure.
Much of my trajectory as a programmer and teacher of programming is an elaboration of that statement.

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


#57173

FromChris Angelico <rosuav@gmail.com>
Date2013-10-21 17:56 +1100
Message-ID<mailman.1298.1382338624.18130.python-list@python.org>
In reply to#57163
On Mon, Oct 21, 2013 at 1:07 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> One of the reasons multiple languages exist is because people find that
> useful programming idioms and styles are *hard to use* or "ugly" in some
> languages, so they create new languages with different syntax to make
> those useful patterns easier to use. But syntax is not everything.
> Whether you write:
>
> object.method(arg)    // Python, VB, Ruby, Java
> object#method arg     // OCaml
> object:method arg     // Lua
> method object arg     // Haskell, Mercury
> object method arg     // Io
> object->method(arg)   // C++, PHP
> method(object, arg)   // Ada, Dylan
> send method(arg) to object  // XTalk family of languages
>
>
> etc. does not really change the fact that you are calling a method on an
> object, despite the change in syntax. Even Forth has frameworks that let
> you write object-[oriented|based] code using a stack and reverse Polish
> notation syntax.

There seems to be a school of thought that "if it doesn't have special
syntax, the language doesn't support it". This is true to an extent
(eg C doesn't support sockets, the code is all in the standard
library), and it does distinguish C from C++ in object orientation
(C's version is simply dedicating the first function argument to
'self', where C++ and Python and so on have an alternative syntax that
puts the self/this argument before the function name), but I don't
know that it's the whole story. Python 2.x has special (and somewhat
magical) syntax for file I/O; Python 3.x, as far as I know, has none -
open and print are just builtins, with no magic around them. Which is
better? I would say that standard functions are inherently more
flexible (you can shadow print and call the original, for instance),
but that would mean that the better way is to NOT "support" I/O.

If an analogy helps, let's look at the trading card game Magic: The
Gathering. The general design principle is that unusual effects get
written out on the card, rather than having actual rules to support
them; rulebook text is used only when printing abilities on the card
is unable to do everything. (There are also keyword abilities, which
are like Python's builtins - "fear" simply means "can't be blocked
except by artifact and/or black creatures", and it could just as well
be written out on the card.) Does this mean that Magic supports
lifelink (which has entries in the Comprehensive Rulebook) but doesn't
support defenders (which simply can't attack)? I think not; the game
is most definitely designed for both.

Granted, C probably wasn't designed with object orientation in mind;
but it doesn't take very much effort to make it work (just pointer
casts and some argument order conventions). Sure, a bit of real
support helps (preventing accidental cross-casts), but it's pretty
easy to manage without. Adding to the list of object oriented C
systems is NIH:

http://ifdeflinux.blogspot.com/2012/05/quick-libnih-tutorial.html

It's small enough and light enough to be used by really early systems
like Upstart (a Linux bootloader) and it's a garbage-collected
object-oriented C library.

ChrisA

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


#57193

FromRoy Smith <roy@panix.com>
Date2013-10-21 09:05 -0400
Message-ID<roy-32D184.09050521102013@news.panix.com>
In reply to#57173
On Mon, Oct 21, 2013 at 1:07 PM, Steven D'Aprano 
<steve+comp.lang.python@pearwood.info> wrote:
> One of the reasons multiple languages exist is because people find that
> useful programming idioms and styles are *hard to use* or "ugly" in some
> languages, so they create new languages with different syntax to make
> those useful patterns easier to use. But syntax is not everything.
> Whether you write:
>
> object.method(arg)    // Python, VB, Ruby, Java
> object#method arg     // OCaml
> object:method arg     // Lua
> method object arg     // Haskell, Mercury
> object method arg     // Io
> object->method(arg)   // C++, PHP
> method(object, arg)   // Ada, Dylan
> send method(arg) to object  // XTalk family of languages

You missed the ever-so-special Objective C syntax:

[object method arg1 withSomething arg2 withSomethingElse arg3]

I'm sure I got that slightly wrong.  I don't do Objective C, and my eyes 
glaze over every time I have to read it.

And, of course, there's Postscript (stolen from Forth) stack syntax:

arg3
arg2
arg1
function

although it's more than just syntax; it's a totally different program 
architecture.  A lot of people don't realize that PostScript is not just 
a printer file format, it's a real language with functions, variables, 
loops, and all that good stuff.

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


#57243

FromLele Gaifax <lele@metapensiero.it>
Date2013-10-22 09:38 +0200
Message-ID<mailman.1342.1382427510.18130.python-list@python.org>
In reply to#57193
Roy Smith <roy@panix.com> writes:

> You missed the ever-so-special Objective C syntax:
>
> [object method arg1 withSomething arg2 withSomethingElse arg3]
>
> I'm sure I got that slightly wrong.  I don't do Objective C, and my eyes 
> glaze over every time I have to read it.

The actual syntax would be

  [object method: arg1 withSomething: arg2 withSomethingElse: arg3]

and IMHO once you train your eyes the result is very readable, and
closely resembles Python's keywords (and I took advantage of the
similarity when I enjoyed developing PyObjC :)

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.

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


#57347

FromSteven D'Aprano <steve@pearwood.info>
Date2013-10-23 08:16 +0000
Message-ID<526785c1$0$30000$c3e8da3$5496439d@news.astraweb.com>
In reply to#57243
On Tue, 22 Oct 2013 09:38:16 +0200, Lele Gaifax wrote:

> Roy Smith <roy@panix.com> writes:
> 
>> You missed the ever-so-special Objective C syntax:
[...]
> The actual syntax would be
> 
>   [object method: arg1 withSomething: arg2 withSomethingElse: arg3]

I don't get how to map that to Python's syntax.

object.method(arg1, arg2, arg3)

What are "withSomething" and "withSomethingElse"?


-- 
Steven

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


#57349

FromNed Batchelder <ned@nedbatchelder.com>
Date2013-10-23 06:36 -0400
Message-ID<mailman.1402.1382524611.18130.python-list@python.org>
In reply to#57347
On 10/23/13 4:16 AM, Steven D'Aprano wrote:
> On Tue, 22 Oct 2013 09:38:16 +0200, Lele Gaifax wrote:
>
>> Roy Smith <roy@panix.com> writes:
>>
>>> You missed the ever-so-special Objective C syntax:
> [...]
>> The actual syntax would be
>>
>>    [object method: arg1 withSomething: arg2 withSomethingElse: arg3]
> I don't get how to map that to Python's syntax.
>
> object.method(arg1, arg2, arg3)
>
> What are "withSomething" and "withSomethingElse"?
>
>

The Python would be:

     object.method(arg1, withSomething=arg2, withSomethingElse=arg3)

--Ned.

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


#57366

FromGrant Edwards <invalid@invalid.invalid>
Date2013-10-23 14:21 +0000
Message-ID<l48m0u$9g$1@reader1.panix.com>
In reply to#57349
On 2013-10-23, Ned Batchelder <ned@nedbatchelder.com> wrote:
> On 10/23/13 4:16 AM, Steven D'Aprano wrote:
>> On Tue, 22 Oct 2013 09:38:16 +0200, Lele Gaifax wrote:
>>
>>> Roy Smith <roy@panix.com> writes:
>>>
>>>> You missed the ever-so-special Objective C syntax:
>> [...]
>>> The actual syntax would be
>>>
>>>    [object method: arg1 withSomething: arg2 withSomethingElse: arg3]
>> I don't get how to map that to Python's syntax.
>>
>> object.method(arg1, arg2, arg3)
>>
>> What are "withSomething" and "withSomethingElse"?
>
> The Python would be:
>
>      object.method(arg1, withSomething=arg2, withSomethingElse=arg3)

FWIW, the Objective C syntax and semantics are both based on Smalltalk
(which, IMO, is a somewhat easier to understand than OC).

-- 
Grant Edwards               grant.b.edwards        Yow! He is the MELBA-BEING
                                  at               ... the ANGEL CAKE
                              gmail.com            ... XEROX him ... XEROX
                                                   him --

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


#57350

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2013-10-24 00:31 +1300
Message-ID<bcpqc6F2fk9U1@mid.individual.net>
In reply to#57347
Steven D'Aprano wrote:
> On Tue, 22 Oct 2013 09:38:16 +0200, Lele Gaifax wrote:
> 
>>The actual syntax would be
>>
>>  [object method: arg1 withSomething: arg2 withSomethingElse: arg3]
>
> I don't get how to map that to Python's syntax.

It's roughly morally equivalent to

    object.method(arg1, withSomething = arg2, withSomethingElse = arg3)

But there are several reasons why it's not really equivalent
to that. PyObjC actually maps it to

    object.method_withSomething_withSomethingElse_(arg1, arg2, arg3)

which is very close to what Objective C is doing under the hood.

-- 
Greg

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


#57372

FromLele Gaifax <lele@metapensiero.it>
Date2013-10-23 17:56 +0200
Message-ID<mailman.1415.1382543829.18130.python-list@python.org>
In reply to#57350
Gregory Ewing <greg.ewing@canterbury.ac.nz> writes:

> Steven D'Aprano wrote:
>> On Tue, 22 Oct 2013 09:38:16 +0200, Lele Gaifax wrote:
>>
>>>The actual syntax would be
>>>
>>>  [object method: arg1 withSomething: arg2 withSomethingElse: arg3]
>>
>> I don't get how to map that to Python's syntax.
>
> It's roughly morally equivalent to
>
>    object.method(arg1, withSomething = arg2, withSomethingElse = arg3)
>
> But there are several reasons why it's not really equivalent
> to that. PyObjC actually maps it to
>
>    object.method_withSomething_withSomethingElse_(arg1, arg2, arg3)
>
> which is very close to what Objective C is doing under the hood.

Right (IIRC, I initially used a double underscore as separator), and
that's because in ObjC the method

  [object method:arg1 withSomething:arg2 withSomethingElse:arg3]

is completely unrelated to

  [object method:arg1 withSomethingElse:arg3 withSomething:arg2]

I wish I had a way, at the time (we were in the 1.x era), to use
something like OrderedDict to carry around the kwargs argument of a
function/method, that could let me use a nicer syntax... I did even
cook-up a quick&dirty patch, but being too biased toward the "dirty"
side it did not go too far.

ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.

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


#57080

FromPeter Cacioppi <peter.cacioppi@gmail.com>
Date2013-10-18 13:56 -0700
Message-ID<44224ad5-a4f7-4d8f-bec0-47f4f9895a2a@googlegroups.com>
In reply to#56759
> give me practicality beats purity any day of the week :) 

Without some notion of theory you will end up with php instead of python (see how I looped the thread back around on track ... you're welcome).

If you think php is no worse than python for building reliable, readable code bases than god love you. Readability is huge for allowing efficient team development of larger projects, and readability flows from these sort of discussions.



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


#57171

FromPeter Cacioppi <peter.cacioppi@gmail.com>
Date2013-10-20 23:44 -0700
Message-ID<91c7fd83-3e8b-4c41-9e16-7baaac518397@googlegroups.com>
In reply to#56759
I've written a fair bit of code in pure C, C++, C#, Java and now getting there in Python.

The difference between C# and Java is fairly minor.

The others have large and significant differences between them. Garbage collectors or not is huge. Exceptions or not is huge.  Dynamic or static typing is huge. Language support for polymorphism or not is huge.

C code invokes a very meaningful overhead of memory management. The task of insuring that memory doesn't leak here is far larger than in garbage collected languages, and much more difficult than C++ (which can guarantee stack based destruction).

This is just one language feature. I could go on and on. The idea that the differences between these languages is just syntactic sugar and aesthetics is so profoundly misguided that I can only assume that this misconception was proposed as a bizarre form of trolling.

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


#57175

FromChris Angelico <rosuav@gmail.com>
Date2013-10-21 18:01 +1100
Message-ID<mailman.1299.1382338873.18130.python-list@python.org>
In reply to#57171
On Mon, Oct 21, 2013 at 5:44 PM, Peter Cacioppi
<peter.cacioppi@gmail.com> wrote:
> I've written a fair bit of code in pure C, C++, C#, Java and now getting there in Python.
>
> The difference between C# and Java is fairly minor.
>
> The others have large and significant differences between them. Garbage collectors or not is huge. Exceptions or not is huge.  Dynamic or static typing is huge. Language support for polymorphism or not is huge.
>
> This is just one language feature. I could go on and on. The idea that the differences between these languages is just syntactic sugar and aesthetics is so profoundly misguided that I can only assume that this misconception was proposed as a bizarre form of trolling.

I don't think anyone's denying that there are differences. If there
weren't, we'd all be using the same language! But most of what you
said isn't object orientation. Garbage collection is huge, but it's
nothing to do with OOP. Exceptions are completely separate again. (And
exception *usage* is separate from exceptions. C++ and PHP both
support exceptions, but most operations don't raise them. Python, on
the other hand, uses exceptions for everything.)

ChrisA

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


#57178

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-10-21 08:27 +0100
Message-ID<mailman.1300.1382340474.18130.python-list@python.org>
In reply to#57171
On 21/10/2013 07:44, Peter Cacioppi wrote:
> I've written a fair bit of code in pure C, C++, C#, Java and now getting there in Python.
>
> The difference between C# and Java is fairly minor.
>
> The others have large and significant differences between them. Garbage collectors or not is huge. Exceptions or not is huge.  Dynamic or static typing is huge. Language support for polymorphism or not is huge.
>
> C code invokes a very meaningful overhead of memory management. The task of insuring that memory doesn't leak here is far larger than in garbage collected languages, and much more difficult than C++ (which can guarantee stack based destruction).
>
> This is just one language feature. I could go on and on. The idea that the differences between these languages is just syntactic sugar and aesthetics is so profoundly misguided that I can only assume that this misconception was proposed as a bizarre form of trolling.
>
>

As my crystal ball is once again being mended, would you please be kind 
enough to tell all of us who and exactly what you're replying to.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

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


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

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


csiph-web