Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: comp.lang.c Subject: Re: Lambdas in C, constructor, destructor, new and delete Date: Fri, 24 Nov 2017 20:18:07 +0100 Organization: Informatimago Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net 092WR5N25uPogt0+TyW+2Q/iVcPeEFVu5QC+2gCrE6Vf+dpcmj Cancel-Lock: sha1:MTUxNThmZWI1NTE3NDQxMGQ1NzdkNDk3YzJhNmVjZmIyYmE0MzA0ZQ== sha1:AU2QOHsjWRbfcjtpMtGyZIkRic4= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Xref: csiph.com comp.lang.c:123450 bartc 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