[Cuis] isXXX methods? (was Re: 4 additions to core?)

H. Hirzel hannes.hirzel at gmail.com
Thu May 14 03:52:26 CDT 2015


Thank you for the clarification, Juan.

I am aiming at semi-automated porting, i.e. to come up with a recipe
of activities to do the port https://github.com/hhzl/Cuis-NeoCSV.

I want to redo it, as Sven has posted a new version last week end.

Replacing

     isCharacter

with

    is: Character

is fine.


Then I'd like to apply the same recipe to his NeoJSON package.

cheers
Hannes

On 5/14/15, Juan Vuletich <juan at jvuletich.org> wrote:
> Hi Hannes,
>
> On 5/13/2015 4:54 PM, H. Hirzel wrote:
>> I do not fully get you Juan.
>>
>> Could you provide a bit more context about what you want to do with the
>>
>>        isXXX
>>
>> methods?
>>
>> HH
>
> I just think that Object has too many methods, and has a lot of methods
> that are not the business of Object at all. A clear example is
> #isMethodProperties. Does Object really need to know or care about
> MethodProperties?
>
> For the particular case of isXXX methods, in many cases they can be
> replaced by a single #is: method that in Object just answers false. See
> implementors in Cuis for its use.
>
> There are many isXXX methods still in Cuis. #isHeap is an example.
>
> HTH.
>
> Cheers,
> Juan Vuletich
>
>> On 5/13/15, Juan Vuletich<juan at jvuletich.org>  wrote:
>>> There's always more cleanup to be done!
>>>
>>> #isHeap is easy to remove. But #isArray might be a bit riskier. These
>>> isXXX methods that simply answer a constant are extremely fast, and
>>> never cause context switch. I guess this is important for #isFloat,
>>> #isInteger, #isFraction, although the default that answers false could
>>> be defined in Number, and not Object... And I'm not really sure for
>>> #isArray.
>>>
>>> As usual, if you feel like digging into this, contributions are welcome.
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>> On 5/12/2015 12:18 PM, David Graham wrote:
>>>> I agree with this. :)  A while back I noticed that some collections
>>>> have isXXX (like isArray and isHeap), while others don't.  Is this
>>>> just a matter of cleanup or is there some logic I'm missing?
>>>>
>>>> On 5/10/2015 1:31 PM, Juan Vuletich wrote:
>>>>>
>>>>> - Character>>  isCharacter
>>>>> I guess we'd also need to add it to Object for this to make sense.
>>>>> But we all agree that calling isXXX methods is not nice style, right?
>>>>>
>>>>
>>>> _______________________________________________
>>>> Cuis mailing list
>>>> Cuis at jvuletich.org
>>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>
>> _______________________________________________
>> Cuis mailing list
>> Cuis at jvuletich.org
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>
>




More information about the Cuis mailing list