metaeducation / rebol-issues

6 stars 1 forks source link

Remove the DO keyword from PARSE #2085

Closed rebolbot closed 9 months ago

rebolbot commented 11 years ago

Submitted by: Ladislav

The DO keyword is totally unused and even the bug report for it was written by a user who did not try to write a dialect at all and was just testing the PARSE behaviour.

The fact that the feature is totally unused is a very good proof for me that the feature is gratuitous.

I do not want to give any more arguments since no other argument can have the power of this one. I can only add that this is not the first time I am expressing this opinion and I have been proven correct by the weight of the time that passed since I said it for the first time. Just for the reference I restate that I did not plan to use this feature, do not know about anybody who did, and I am not going to change my mind about it.

Also for the record, there are features I would like to see in PARSE, like the CASE feature (#1898 e.g.), but this one does not make it to the list of the useful ones.

CC - Data [ Version: r3 master Type: Wish Platform: All Category: Parse Reproduce: Always Fixed-in:none ]

rebolbot commented 11 years ago

Submitted by: Gregg

Can you clarify in the description that this tickets is to remove DO from PARSE, not REBOL itself, just to avoid confusion? I know it's marked as the 'parse category, but I missed that when I first read the ticket, having not read the previous ticket.

rebolbot commented 11 years ago

Submitted by: Ladislav

Done, but Rebol (I mean the Do dialect) does not have a DO keyword.

rebolbot commented 10 years ago

Submitted by: BrianH

It was a surprise to me that the keyword had been implemented at all yet, so it's not a surprise that it hadn't been used (especially given that its most important feature hasn't been implemented, see #2083 for details). However, there are better arguments against its use than that it hasn't been used.

More importantly, it's a bad fit for its intended use, mostly by being a PARSE keyword in the first place.

There are also reasons that aren't really related to it's being a PARSE keyword, but are still important:

Added to all this, now that Rebol is open-source, the need to make dialects without native code is less important, since using native code is easier than it used to be. What is more important is having a variety of different approaches to choose from, with different approaches, developed by the community. It's better to go with many optional, add-on (but embeddable) solutions to this problem, rather than something built into PARSE.

hostilefork commented 9 months ago

DO has been removed, but UPARSE supports combinators which do something like it:

https://github.com/metaeducation/ren-c/blob/master/tests/parse/examples/evaluate.parse.test.reb