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


Groups > comp.lang.c > #123450

Re: Lambdas in C, constructor, destructor, new and delete

From "Pascal J. Bourguignon" <pjb@informatimago.com>
Newsgroups comp.lang.c
Subject Re: Lambdas in C, constructor, destructor, new and delete
Date 2017-11-24 20:18 +0100
Organization Informatimago
Message-ID <m2po87cwpc.fsf@informatimago.com> (permalink)
References <fa6af86e-e8be-43f2-8220-d6782d903ac9@googlegroups.com> <BqWRB.69420$C51.9001@fx26.am4>

Show all headers | View raw


bartc <bc@freeuk.com> writes:

> On 24/11/2017 13:30, Thiago Adams wrote:
>>
>> We have too many threads about the improvements for C I don't know
>> which one to use.
>>
>> One think that I really need in C is lambdas.
>>
>> Lambdas without capture are not to hard to design in C.
>> They would be similar of compound literal but for functions.
>
> It's funny but I don't think I've ever had a pressing need for lambdas
> (possibly never).

If you have never passed a function to another with an additionnal value
(perhaps a void*) for the callback, then ok, perhaps you don't need
closures.

-- 
__Pascal J. Bourguignon
http://www.informatimago.com

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


Thread

Lambdas in C, constructor, destructor, new and delete Thiago Adams <thiago.adams@gmail.com> - 2017-11-24 05:30 -0800
  Re: Lambdas in C, constructor, destructor, new and delete bartc <bc@freeuk.com> - 2017-11-24 14:56 +0000
    Re: Lambdas in C, constructor, destructor, new and delete Thiago Adams <thiago.adams@gmail.com> - 2017-11-24 07:58 -0800
      Re: Lambdas in C, constructor, destructor, new and delete Spiros Bousbouras <spibou@gmail.com> - 2017-11-24 16:33 +0000
        Re: Lambdas in C, constructor, destructor, new and delete Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2017-11-24 08:43 -0800
          Re: Lambdas in C, constructor, destructor, new and delete Thiago Adams <thiago.adams@gmail.com> - 2017-11-24 08:48 -0800
        Re: Lambdas in C, constructor, destructor, new and delete Thiago Adams <thiago.adams@gmail.com> - 2017-11-24 09:05 -0800
    Re: Lambdas in C, constructor, destructor, new and delete "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-11-24 20:18 +0100
      Re: Lambdas in C, constructor, destructor, new and delete bartc <bc@freeuk.com> - 2017-11-24 20:47 +0000
        Re: Lambdas in C, constructor, destructor, new and delete Thiago Adams <thiago.adams@gmail.com> - 2017-11-25 11:17 -0800
    Re: Lambdas in C, constructor, destructor, new and delete David Brown <david.brown@hesbynett.no> - 2017-11-24 16:54 +0100
      Re: Lambdas in C, constructor, destructor, new and delete Thiago Adams <thiago.adams@gmail.com> - 2017-11-25 13:18 -0800
        Re: Lambdas in C, constructor, destructor, new and delete Ian Collins <ian-news@hotmail.com> - 2017-11-26 12:03 +1300
          Re: Lambdas in C, constructor, destructor, new and delete bartc <bc@freeuk.com> - 2017-11-26 00:16 +0000
          Re: Lambdas in C, constructor, destructor, new and delete Thiago Adams <thiago.adams@gmail.com> - 2017-11-28 03:11 -0800
            Re: Lambdas in C, constructor, destructor, new and delete Ian Collins <ian-news@hotmail.com> - 2017-11-29 10:39 +1300
              Re: Lambdas in C, constructor, destructor, new and delete Thiago Adams <thiago.adams@gmail.com> - 2017-11-29 02:52 -0800
              Re: Lambdas in C, constructor, destructor, new and delete bartc <bc@freeuk.com> - 2017-11-29 11:48 +0000
                Re: Lambdas in C, constructor, destructor, new and delete Thiago Adams <thiago.adams@gmail.com> - 2017-11-29 08:42 -0800

csiph-web