[Cuis-dev] Array evalStrings

Juan Vuletich juan at cuis.st
Fri Feb 9 05:15:35 PST 2024


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



More information about the Cuis-dev mailing list