[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is gcc able to handle anonymous functions?

From: Marc Hohl
Subject: Re: Is gcc able to handle anonymous functions?
Date: Fri, 06 Jul 2012 09:44:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

Am 05.07.2012 18:36, schrieb Joe Neeman:

On Thu, Jul 5, 2012 at 8:44 AM, address@hidden <mailto:address@hidden> <address@hidden <mailto:address@hidden>> wrote:

    On 5 juil. 2012, at 08:14, Joe Neeman wrote:


    On Thu, Jul 5, 2012 at 12:37 AM, address@hidden
    <mailto:address@hidden> <address@hidden
    <mailto:address@hidden>> wrote:

        On 4 juil. 2012, at 20:10, Marc Hohl wrote:

    Why not just leave the function in C++? I have nothing against
    porting things to scheme, but in this case it just seems like an
    exercise in making things more complicated, for no gain.

    It's doable - the goal was to port the entire thing to Scheme.
     You're right that it is much easier to write in C++.

    I think it's exercises like that that help strengthen the Scheme
    bindings and thus lead to more customizability/extensibility.

In this case, I disagree. The function in question is used in 2 places in the C++ code, neither of which is a good candidate for customization.
I agree, I don't see a need for customization in this place, either.
The only argument for porting this function in the first place is that it happened to live in the same file as some other stuff (which _did_ make sense to port). That doesn't sound like a very good argument to me.
If the funtion is not ported, where should it be defined?

Keeping alive for the definition of one function feels kinda weird, so either I define the helper function in each file where it is used, or is there
a better and more global place for this function?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]