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
form difference between red and rebol #1830
Comments
There is a typo in x8x's example, it should be:
|
This change was done on purpose to give more value to |
For the completeness here, mold gives "[a/:b]" where form gives one of the above. |
I would keep the
Simply |
@Oldes How are your code example and FORM related? I don't get it. FORM is for serializing values as strings for human-friendly display. |
@dockimbel I don't like when something is changing meaning behind my back. Also don't understand how removing one char can make something more human-friendly in such a case. |
A string has no meaning, and FORM is not to be used to create LOADable code, that's the job of MOLD. FORM is currently too similar to MOLD, which makes it not very useful. Having FORM undecorate word types adds a feature and doesn't remove any. That said, I don't have a real use-case for it right now, so I'm just wondering if such change would be really beneficial or not. |
I don't agree.. content of the string has meaning... usually.. honestly I'm not sure if I use |
Having result of the second expression just |
You think too much about FORM as a MOLD alternative, which is not. If you think it would be strange, then what about this in Rebol:
FORM is already undecorating other datatypes for more "readable" output where the content matters more than the origin datatype, that's its purpose. I'm just proposing to make that more consistent with how any-word! values are FORMed. |
I am in two minds about this, but it is true that e.g. |
@dockimbel ok.. your argument is strong. Anyway, I don't care much.. I was searching in my code base and found almost none I still don't have any idea, why I would need to use |
I am not sure either if such change would be beneficial or not in practice, that's why I asked others opinion. FORM has always been an odd function anyway, so its sematics needs some clearing, we could even repurpose it for a text formatting dialect. |
I would use it for text formatting dialect, if you want to modify it from the original functionality anyway. |
Imho... when in Rebol is:
than probably even your proposed change in path is correct. |
I don’ think |
@Oldes In Rebol3, it's different than Rebol2, not sure why:
|
I am with Oldes here, while not trying to solve the |
|
For the record, in Rebol2:
|
@rebolek Ask yourself if you ever used |
What does the human readable argument mean anyway? Did Carl ever define that precisely somewhere? |
@Oldes Indeed, the various ways to serialize values are messy in Rebol. That is one of the reasons I wanted to take the time to analyze |
|
I still think that removing some chars from values is not making it human readable... if so, you could also remove |
Removing leading % from file is useful though. |
@Dobeash What is your use case for filenames without the leading |
You could even argue that "a/b" is more human readable than "a/:b" but then "ab" or "a b" will be even more human readable. |
Afaik, FORM is only really used by PRINT I use print only on data I previously construct (using various methods). so my two cents is to completely remove the current FORM mechanism. its virtually useless |
For what it's worth, if FORM is supposed to take data and makes it human readable, then the actual output format is up for grabs and may change between versions. That means, it's always risky to parse FORMed data. It just hasn't been risky, since the output of FORM has been largely identical across different REBOL clones, AFAIK. The way that FORM is used in R2, where I have the most experience, serves as an alternative to MOLD in that it conveniently leaves out square brackets. I use it, because it happens to give the necessary output. This should not be how to use FORM. There ought to be very specific DEBRACKET and BRACKET functions for that. I always saw FORM as just the very basics of providing human readable REBOL values and if it were to become much more advanced, say, FORMing objects or even images, then the output is really up for grabs and should never be parsed back into Red, unless you really have no choice. This is because I see FORM eventually becoming configurable for your favorite date and time format, or for specific ways you want to output objects and blocks as ASCII tables or images as ASCII art. This is a big frustration for me in REBOL, because there's no formal way to configure things like date and time and number decimal formatting, and you always have to build your formatters as slow mezzanines. |
Also, |
@henrikmk makes a good point here. I'll close this, and we can reopen if needed. |
@greggirwin Ok.. so the decision was, that |
Btw... there is this old blog: http://www.rebol.net/cgi-bin/r3blog.r?view=0304 where Carl said:
I wonder if there is any such a list now. |
@meijeru yes... I've seen it, but I would prefer to see such a table with the suppose to be correct results. For example now I have in Red this: >> form quote a/b/c:
== "a/b/c:" but shouldn't it be just |
The generating program will just show what is implemented currently. Thus it allows anyone to review and state what they would rather want the implementation to be. Nothing prevents you from making a WISH issue (or a REP) on particular items. |
@Oldes, they're only bugs if not doing what we want. :^) The table is enormously helpful, because we can see each case and point out what we think should change. |
@greggirwin I agree, but where to see what we want? :-) |
In your mind. Then write it down for the rest of us. :^) |
People can certainly copy the table and tweak it manually. That lets us see everything in context. |
red:
rebol:
Is this on purpose?
The text was updated successfully, but these errors were encountered: