-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stringy
feels over-engineered, partially implemented and bitrotted
#445
Comments
Inspired by rakudo/rakudo#2548 |
I appreciate the attempt at
But a few things throw this off. I could envision someone potentially using Ultimately, we as a community have chosen to use |
I have come across Stringy in my various explorations of Allomorphs. Conceptually, I would say that there is value in differentiating the Role and Class aspects of a raku datatype: For example, we have: RatStr So seems to me that the raku type system is dogfooding roles and classes in a good way. The class isa relationships go to Cool which is a thing that has real functions and instances take memory So I would be fine to drop Blob and Uni from the Stringy role (I am not sure why that was considered a good design in the first place) But, I would be sad if there were no Stringy <=> Numeric level of conceptual distinction as distinct from the Str <=> Int level of implementation distinction. One benefit of this is that the number world has more layers and branches vs. the stringy world and I can imagine this changing or that I would like to consume these roles for my own custom types. |
Agreed -- conceptually it makes sense. But in practice, what is the practical difference for those allomorphs? They're all ultimately One of the values of the But
Doing a generic
I can't really do anything. The only methods I can call on them are those inherited from
The latter one is REALLY bad because you would think the following code would work and return a blob of sorts and thus you'd be safe to concat the results of two separate calls to
But in the second call with no args, the identity is used (e.g. 1 for multiplication, or 0 for addition), which in this case is the empty I think the best thing to do is going to be to retire
This would probably require some reworking on Blob and Bluf, as those are roles that are, afaict, punned which makes it difficult to augment. |
The problem with alabamhenu's example using a Stringy identity is that the identity is an empty string, rather than a more generic empty Stringy object. It is quite easy to fix rakudo to make
near the other definitions of A better solution would be to define a more generic Stringy empty object and add the relevant definitions for (I am assuming that deleting the Stringy role would keep |
@kjpye: while on the surface, it might look like it could fix it, I'd be hesitant to say that defining The generic stringy empty object will run into other issues. Imagine I pass the result of a (I'm not opposed to such an allomorph, I've thought it would be good if the various The only simple thing is getting rid of |
I'd love to continue the conversation I started with @thoughtstream about formalizing Ternary Logic in Raku, for Data Science purposes. Not sure if Oh yes, and an operator that goes along with it, maybe > Nil =t= Nil
Nil |
This comment was marked as off-topic.
This comment was marked as off-topic.
I suggest we hide our comments about ternary logic in this thread, then continue here until there's clarity about a more appropriate place to discuss it. (This comment will |
And it would make things a lot simpler if it were to be removed.
Or at least have better documentation about its functionality.
The text was updated successfully, but these errors were encountered: