automake-ng
[Top][All Lists]
Advanced

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

Re: [Automake-NG] [PATCH 4/4] [ng] cleanup: after enabling of subdir-obj


From: Akim Demaille
Subject: Re: [Automake-NG] [PATCH 4/4] [ng] cleanup: after enabling of subdir-objects unconditionally
Date: Fri, 8 Jun 2012 12:21:25 +0200

Le 8 juin 2012 à 12:14, Stefano Lattarini a écrit :

>> I'd like to know more about the error actually.
>> It must be that the other side is actually expecting a value.
>> So IMHO, the caller should be fixed.
>> 
> No, the caller (handle_single_transform) deliberately discriminate between
> "no returned value" and "returned defined value" to decide whether it needs
> to so some more processing:

Ah, that's the bit I was lacking.

>>> As the Zen goes, "Explicit is better than implicit" :-)
>>> But I'll do the change if you insist.
>> 
>> I mostly agree with your Zen,
>> 
> It's not mine, it's Python's ;-)

I know.  Yet it's the one you refer to :)

>> but I strongly disagree that
>> it applies here.  Every single modern language, especially
>> functional ones, have the "return" unnecessary.
>> 
> Not the case for Python.


Python is inconsistent on this regard.

>>> a = lambda : 14
>>> a()
14

>>>>> +# Vala '.vapi' are a kind of header files as well, and should
>>>>> +# not be processed into compilation rules.
>>>>> + sub lang_vala_ignore
>>>>> {
>>>>> -    # Header files are simply ignored.
>>>>> -    return LANG_IGNORE;
>>>>> +    my ($directory, $base, $ext) = @_;
>>>>> +    return ($ext =~ m/\.vapi$/ ? 1 : 0);
>>>> 
>>>> No return, no parens.  etc.
>>>> 
>>> See above.  The fact that perl allows us to be obscure is not a good
>>> reason to be obscure.  Removing the return and the three-way conditional
>>> would seriously hurt readability IMO.
>> 
>> Not my opinion :)
>> 
> But I won't do the change here, since readability would be truly hampered
> (for me at least).   Hope that's OK with you.

You're the Boss!




reply via email to

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