[Cuis-dev] Array evalStrings

Barry Perryman barry.perryman at gmail.com
Mon Feb 19 11:52:58 PST 2024


Apologies for not replying earlier on this, I've been a little distracted
with other items.

I'm still finding my way around Cuis so thanks for being patient and
providing pointers.

Regards

Barry

On Fri, Feb 9, 2024 at 1:15 PM Juan Vuletich <juan at cuis.st> wrote:

> Hi Todd,
>
> On 2/9/2024 12:49 AM, Todd Blanchard via Cuis-dev wrote:
> > I apologize, I meant no disrespect.  Apparently my writing style is
> overly direct.  Lifelong problem.
>
> Thanks for this. It is very much appreciated.
>
> > I kind of fundamentally object to explicit tests of class because it
> makes for brittle code. We had one kind of String class and there was code
> that tested to see if an instance was of class String.  Then we added
> another kind of String class and the code stopped working in some cases. To
> me, that is brittle.
>
> Indeed!
>
> I had already tweaked Barry's code when reviewing it, to send #isString
> instead of explicit class tests. I usually do that kind of thing. Most
> often, silently. The original poster can check how their code was
> integrated, and seeing the difference may be useful.
>
> > If we instead rely on polymorphic test methods like isString, the client
> code is more robust.
> >
> > Attached is how I would write evalStrings using isSymbol, isString, and
> isArray.
>
> Your implementation is much nicer, thank you! I'm leaving out the unused
> 'EvalLiterals' class variable, though, as it looks like an unintended slip.
>
> It is now at GitHub.
>
> Cheers,
>
> --
> Juan Vuletich
> cuis.st
> github.com/jvuletich
> researchgate.net/profile/Juan-Vuletich
> independent.academia.edu/JuanVuletich
> patents.justia.com/inventor/juan-manuel-vuletich
> linkedin.com/in/juan-vuletich-75611b3
> twitter.com/JuanVuletich
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240219/bb0ce4e0/attachment-0001.htm>


More information about the Cuis-dev mailing list