[Top][All Lists]

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

Re: ?-suffix for booleans... good-idea? or bad-idea?

From: Alex Kost
Subject: Re: ?-suffix for booleans... good-idea? or bad-idea?
Date: Wed, 26 Apr 2017 18:25:43 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Paul (2017-04-25 12:21 -0400) wrote:

> On 04/25/2017 11:50 AM, Jan Wedekind wrote:
>> What do people think?  I'm struggling with deciding what's the right
>> thing for my own code, but leaning towards "we shouldn't use the ?
>> suffix for just boolean values".
> I like using the '?' suffix only for predicates.  I often use 'is-' 
> prefix for boolean values, which reads well: (if is-raining ...)

Thanks for sharing!  I also like to use '?' for functions but I always
felt uncomfortable to use it for variables.  Using "is-" (or "has-" or
alike) sounds interesting, I'm going to try this convention in my code,
thanks for the idea!


reply via email to

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