Ted Zlatanov writes:
> "Make your code readable and sensible, and don't try to be clever."
>
> But this is good C and shell advice too,...
Sounds sensible.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo inf
On Wed, 6 Feb 2013 19:44:16 +0100 demerphq wrote:
d> Ah ok. Right, at a low level:
d> if (condition) { do_this() }
d> is identical to
d> condition && do_this();
d> IOW, Perl allows logical operators to act as control flow statements.
d> I hope your document include something that says that
On 6 February 2013 19:35, Ted Zlatanov wrote:
> On Wed, 6 Feb 2013 19:25:43 +0100 demerphq wrote:
>
> d> On 6 February 2013 19:05, Ted Zlatanov wrote:
>>> On Wed, 06 Feb 2013 08:29:30 -0800 Junio C Hamano wrote:
>>>
> JCH> Is it ever (as opposed to "not always") possible to omit braces?
>>>
>>>
On Wed, 6 Feb 2013 19:25:43 +0100 demerphq wrote:
d> On 6 February 2013 19:05, Ted Zlatanov wrote:
>> On Wed, 06 Feb 2013 08:29:30 -0800 Junio C Hamano wrote:
>>
JCH> Is it ever (as opposed to "not always") possible to omit braces?
>>
>> Oh yes! Not that I recommend it, and I'm not even goi
On Wed, 06 Feb 2013 10:16:21 -0800 Junio C Hamano wrote:
JCH> I'd suggest to just drop that "try to write without braces" entirely.
OK, I'll do it on the reroll, or you can just make the change directly.
I agree it was not going anywhere :)
Ted
diff --git a/Documentation/CodingGuidelines b/D
On 6 February 2013 19:05, Ted Zlatanov wrote:
> On Wed, 06 Feb 2013 08:29:30 -0800 Junio C Hamano wrote:
>
> JCH> Is it ever (as opposed to "not always") possible to omit braces?
>
> Oh yes! Not that I recommend it, and I'm not even going to touch on
> Perl Golf :)
I think you are wrong. Can yo
On 6 February 2013 19:14, Junio C Hamano wrote:
> demerphq writes:
>
>> As you mention below statement modifiers have their place. For instance
>>
>> next if $whatever;
>>
>> Is considered preferable to
>>
>> if ($whatever) {
>> next;
>> }
>>
>> Similarly
>>
>> open my $fh, ">", $filename
>>
Ted Zlatanov writes:
> On Wed, 06 Feb 2013 08:29:30 -0800 Junio C Hamano wrote:
>
> JCH> Is it ever (as opposed to "not always") possible to omit braces?
>
> Oh yes! Not that I recommend it, and I'm not even going to touch on
> Perl Golf :)
>
> JCH> It sounds as if we encourage the use of stat
demerphq writes:
> As you mention below statement modifiers have their place. For instance
>
> next if $whatever;
>
> Is considered preferable to
>
> if ($whatever) {
> next;
> }
>
> Similarly
>
> open my $fh, ">", $filename
>or die "Failed to open '$filename': $!";
>
> Is considered pref
On Wed, 6 Feb 2013 18:45:56 +0100 demerphq wrote:
d> So if you objective is maintainability I would just ban "unless" outright.
Please consider me opposed to such a ban.
Ted
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
On Wed, 06 Feb 2013 08:29:30 -0800 Junio C Hamano wrote:
JCH> Is it ever (as opposed to "not always") possible to omit braces?
Oh yes! Not that I recommend it, and I'm not even going to touch on
Perl Golf :)
JCH> It sounds as if we encourage the use of statement modifiers, which
JCH> certainl
On 6 February 2013 17:29, Junio C Hamano wrote:
> Ted Zlatanov writes:
>
>> - As in C (see above), we avoid using braces unnecessarily (but Perl
>>forces braces around if/unless/else/foreach blocks, so this is not
>>always possible).
>
> Is it ever (as opposed to "not always") possible t
Ted Zlatanov writes:
> - As in C (see above), we avoid using braces unnecessarily (but Perl
>forces braces around if/unless/else/foreach blocks, so this is not
>always possible).
Is it ever (as opposed to "not always") possible to omit braces?
It sounds as if we encourage the use of st
13 matches
Mail list logo