It's definitely a surmountable thing – I'd actually be rather in favor of
using a trailing ? instead of the is prefix for predicates. I believe Jeff
prefers the is prefix.


On Thu, Jun 12, 2014 at 1:53 PM, Jameson Nash <[email protected]> wrote:

> Interestingly (to me) Apples new language, Swift, uses ? as both a ternary
> operator and a suffix for 'nullable' values, so this isn't an
> insurmountable obstacle.
>
>
> On Thursday, June 12, 2014, Steven G. Johnson <[email protected]>
> wrote:
>
>>
>>
>> On Thursday, June 12, 2014 1:08:37 PM UTC-4, Aerlinger wrote:
>>>
>>> Ruby has a useful convention where methods can end in a '?' to indicate
>>> that it returns a boolean value. This capability would be useful in Julia
>>> as well. Much like the bang (!) suffix on functions it might look something
>>> like this:
>>>
>>> function isEven?(n::Int)
>>>   n % 2 == 2
>>> end
>>>
>>
>> Yes, both the ! and ? suffixes are common conventions, possibly
>> originating in Scheme.  Note that if you have a ? suffix, then you don't
>> need the "is" prefix.
>>
>> However, ? is already being used for the ternary operator in Julia and
>> hence is not available for use in identifiers.  Hence we instead adopt the
>> "is" prefix convention.
>>
>

Reply via email to