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


Groups > comp.lang.python > #76828

Re: Python vs C++

References (4 earlier) <lt85g5$mlq$1@dont-email.me> <87siko9tlq.fsf@elektro.pacujo.net> <53F7B870.2010909@gmail.com> <CAPTjJmpcFFYLT=uWJyjqT3ggT32iVjD3kCpvyWiEQPHo4oh2zA@mail.gmail.com> <53F7BCAB.7000507@gmail.com>
Date 2014-08-23 08:00 +1000
Subject Re: Python vs C++
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.13314.1408744862.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Aug 23, 2014 at 7:56 AM, Michael Torrie <torriem@gmail.com> wrote:
> On 08/22/2014 03:49 PM, Chris Angelico wrote:
>> My main issue with callbacks in either C or C++ is that functions
>> aren't first-class objects. You can pass function pointers around (and
>> you don't need (void *) to do it, you can use typed function pointers
>> just fine), but you can't actually construct a function at run-time.
>
> I'm not sure I fully understand your meaning.  You seem to prefer
> dynamic languages, which is great because this is the Python list after
> all.  I'm not sure I know of any statically compiled language that lets
> one construct a function at run-time.  I know Boost supports lambda
> functions but I'm not sure this is quite what you are referring to either.

Right, I'm just saying that callbacks are inherently restrictive in a
language without first-class functions. So I'm not sure why you have
further issue with C++; C's way of doing callbacks works fine in C++,
and there's not going to be anything better.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python vs C++ David Palao <dpalao.python@gmail.com> - 2014-08-21 14:54 +0200
  Re: Python vs C++ wxjmfauth@gmail.com - 2014-08-21 07:08 -0700
  Re: Python vs C++ Rustom Mody <rustompmody@gmail.com> - 2014-08-21 07:10 -0700
  Re: Python vs C++ Grant Edwards <invalid@invalid.invalid> - 2014-08-21 14:59 +0000
    Re: Python vs C++ Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-08-21 23:12 -0400
  Re: Python vs C++ Christian Gollwitzer <auriocus@gmx.de> - 2014-08-22 10:05 +0200
    Re: Python vs C++ Chris Angelico <rosuav@gmail.com> - 2014-08-22 18:50 +1000
      Re: Python vs C++ Marko Rauhamaa <marko@pacujo.net> - 2014-08-22 12:29 +0300
        Re: Python vs C++ "Neil D. Cerutti" <neilc@norwich.edu> - 2014-08-22 08:51 -0400
        Re: Python vs C++ Skip Montanaro <skip@pobox.com> - 2014-08-22 07:58 -0500
          Re: Python vs C++ Marko Rauhamaa <marko@pacujo.net> - 2014-08-22 20:16 +0300
            Re: Python vs C++ mm0fmf <none@mailinator.com> - 2014-08-23 17:47 +0100
              Re: Python vs C++ Marko Rauhamaa <marko@pacujo.net> - 2014-08-23 19:54 +0300
        Re: Python vs C++ Chris Angelico <rosuav@gmail.com> - 2014-08-22 23:00 +1000
        Re: Python vs C++ Christian Gollwitzer <auriocus@gmx.de> - 2014-08-22 21:25 +0200
          Re: Python vs C++ Stefan Behnel <stefan_ml@behnel.de> - 2014-08-22 21:58 +0200
          Re: Python vs C++ Marko Rauhamaa <marko@pacujo.net> - 2014-08-22 23:06 +0300
            Re: Python vs C++ Michael Torrie <torriem@gmail.com> - 2014-08-22 15:38 -0600
              Re: Python vs C++ wxjmfauth@gmail.com - 2014-08-23 03:00 -0700
            Re: Python vs C++ Chris Angelico <rosuav@gmail.com> - 2014-08-23 07:49 +1000
              Re: Python vs C++ Rustom Mody <rustompmody@gmail.com> - 2014-08-23 05:38 -0700
                Re: Python vs C++ Chris Angelico <rosuav@gmail.com> - 2014-08-23 23:00 +1000
                Re: Python vs C++ Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-23 08:02 -0600
                Re: Python vs C++ Rustom Mody <rustompmody@gmail.com> - 2014-08-23 07:21 -0700
                Re: Python vs C++ Terry Reedy <tjreedy@udel.edu> - 2014-08-23 16:51 -0400
                Re: Python vs C++ Chris Angelico <rosuav@gmail.com> - 2014-08-24 00:21 +1000
                Re: Python vs C++ Terry Reedy <tjreedy@udel.edu> - 2014-08-23 15:09 -0400
                Re: Python vs C++ Joseph Martinot-Lagarde <joseph.martinot-lagarde@m4x.org> - 2014-08-24 14:54 +0200
                Re: Python vs C++ "Neil D. Cerutti" <neilc@norwich.edu> - 2014-08-25 09:01 -0400
            Re: Python vs C++ Michael Torrie <torriem@gmail.com> - 2014-08-22 15:56 -0600
            Re: Python vs C++ Chris Angelico <rosuav@gmail.com> - 2014-08-23 08:00 +1000
              Re: Python vs C++ Marko Rauhamaa <marko@pacujo.net> - 2014-08-23 10:27 +0300
            Re: Python vs C++ dieter <dieter@handshake.de> - 2014-08-23 07:56 +0200
            Re: Python vs C++ Chris Angelico <rosuav@gmail.com> - 2014-08-23 16:11 +1000
              Re: Python vs C++ Paul Rudin <paul.nospam@rudin.co.uk> - 2014-08-23 08:36 +0100
                Re: Python vs C++ Chris Angelico <rosuav@gmail.com> - 2014-08-23 18:04 +1000
          Re: Python vs C++ dieter <dieter@handshake.de> - 2014-08-23 07:48 +0200

csiph-web