-
Notifications
You must be signed in to change notification settings - Fork 4
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
WISH: mold
to apply /only to other datatypes
#170
Comments
I support this idea wholeheartedly. It's always been a (slight) pain to get the object body for serialization. |
Seems like a good improvement, I see no drawback, so we can implement it. |
@hiiamboris This is already handled by |
No, /flat is not what we want here. And I don't know how
Wanted this:
Not this:
|
|
Looks like a kludge to me :)
Anyway, don't you think it'll be simply weird if
|
After implementing it, I see it causes issues with |
Is there any justification for why |
|
Then why don't we patch |
You mean using a dynamic refinement for |
But |
You're right, I was confused by my implementation (letting I'll also remove the extra indentation, I thought it could be useful to keep it, but |
What about these other datatypes: |
The reason is I forgot about them :) |
For
|
Pushed on master: red/red@a691592 |
It's not a 1:1 round trip design, as both |
The main use case I've had, for 25 years now, is saving and loading spec blocks. Beyond that, if we start tinkering too much, to try and make serialized data "cleaner", we do so at the expense of being a clear interchange format. We still have |
It makes little sense for me that
mold/only
applies only to blocks and nothing else.Why can't it work e.g. for
paren!
orhash!
?Or sometimes I have script configuration in a
map!
and want to load/save it without the surrounding#[]
markers and the extra indentation. I have to convert it into a block before molding.I propose
mold/only
should remove from:#[]
markers and 1st indentation levelmake object! []
markers and 1st indentation levelmake error! []
markers and 1st indentation levelmake vector! []
markers (what remains: e.g.[1 2 3]
orfloat! 32 [1.0 2.0 3.0]
)make hash! []
markers()
markersmake image! []
markers and 1st indentation level (what remains:WxH #{...}
)The text was updated successfully, but these errors were encountered: