It turns out I have zero use cases for Succeed(). Not the one I thought of.

Peter-Arno Coppen set me right & suggested a use for Succeed().
I hope he won't mind me posting this here. I don't have his permission. He may not welcome replies from the Unicon Group. (I remember there have been flame wars, even here.)

-------- Forwarded Message --------
Subject:        RE: [snobol] Succeed() useless? UTR18 Unicon, Snobol
Date:   Mon, 15 Feb 2016 12:27:42 +0000
From: 'Coppen, P.A.J.M. (Peter-Arno)' p.a.cop...@let.ru.nl [snobol] <sno...@yahoogroups.com>
Reply-To:       sno...@yahoogroups.com
To:     sno...@yahoogroups.com



The only use would be an oscillation between &SUCCEED PAT &FAIL, where PAT contains an alternative with &ABORT. This way, you can build a kind of control structure in a pattern (by calling functions upon partial matches)

*From:*sno...@yahoogroups.com [mailto:sno...@yahoogroups.com]
*Sent:* maandag 15 februari 2016 13:20
*To:* sno...@yahoogroups.com
*Subject:* Re: [snobol] Succeed() useless? UTR18 Unicon, Snobol

P.A. Coppen:
...&succeed succeeds upon every backtrack. ... [null doesn't]

Jay:
You are quite correct & this is an important difference.
It means that I don't need Succeed() in my use case, as I can replace it by a null match which is more restrictive and therefore different.

Are there any uses at all  for Succeed() / &succeed ?

-------------------------

I was not thinking much about backtracking in relation to gap-in-paradigm patterns. Generally you can match a null anywhere. That makes a pattern to spot gap-in-paradigm potentially difficult. Not backtracking (much) simplifies it. I'd expect in these patterns, immediate assignment doesn't do anything different to conditional assignment.

Maybe I should have added fence to be explicit about how little backtracking I wanted or expected.

p1 = p1 | (Succeed . colOneData FENCE)
and
p4 = p4 | (Succeed . colFourData FENCE)

and /or replace Succeed by null.

Actually, I imagined, but did not program the pattern to be:

    rowpattern =  p1 FENCE p2FENCE p3 FENCE p4 FENCE p5

with P1 & P4 still having null (or Succeed Fence) as the last alternative sub-pattern.

Jay Hammond




On 15/02/2016 09:48, 'Coppen, P.A.J.M. (Peter-Arno)' p.a.cop...@let.ru.nl <mailto:p.a.cop...@let.ru.nl> [snobol] wrote:

   The difference between &succeed and the null string seems to me that
   &succeed succeeds upon every backtrack. So POS(0) &SUCCEED PAT &FAIL
   keeps on trying PAT forever (unless PAT contains &ABORT), and POS(0)
   NULL PAT &FAIL doesn’t.

   Peter-Arno Coppen

   *From:*sno...@yahoogroups.com <mailto:sno...@yahoogroups.com>
   [mailto:sno...@yahoogroups.com]
   *Sent:* maandag 15 februari 2016 1:14
   *To:* unicon-group@lists.sourceforge.net
   <mailto:unicon-group@lists.sourceforge.net>; sno...@yahoogroups.com
   <mailto:sno...@yahoogroups.com>
   *Subject:* [snobol] Succeed() useless? UTR18 Unicon, Snobol

Jay wrote (snipped)

I know a practical use for Succeed() or its equivalents.

Do you have any more?

__._,_.___
------------------------------------------------------------------------
Posted by: "Coppen, P.A.J.M. (Peter-Arno)" <p.a.cop...@let.ru.nl>
------------------------------------------------------------------------
Reply via web post <https://groups.yahoo.com/neo/groups/snobol/conversations/messages/2073;_ylc=X3oDMTJxNjlwdHJiBF9TAzk3MzU5NzE0BGdycElkAzE4OTYzMjk1BGdycHNwSWQDMTcwNTAwNjc2NARtc2dJZAMyMDczBHNlYwNmdHIEc2xrA3JwbHkEc3RpbWUDMTQ1NTUzOTI2Ng--?act=reply&messageNum=2073> • Reply to sender <mailto:p.a.cop...@let.ru.nl?subject=RE%3A%20%5Bsnobol%5D%20Succeed%28%29%20useless%3F%20UTR18%20Unicon%2C%20Snobol> • Reply to group <mailto:sno...@yahoogroups.com?subject=RE%3A%20%5Bsnobol%5D%20Succeed%28%29%20useless%3F%20UTR18%20Unicon%2C%20Snobol> • Start a New Topic <https://groups.yahoo.com/neo/groups/snobol/conversations/newtopic;_ylc=X3oDMTJmNWliZTlpBF9TAzk3MzU5NzE0BGdycElkAzE4OTYzMjk1BGdycHNwSWQDMTcwNTAwNjc2NARzZWMDZnRyBHNsawNudHBjBHN0aW1lAzE0NTU1MzkyNjY-> • Messages in this topic <https://groups.yahoo.com/neo/groups/snobol/conversations/topics/2070;_ylc=X3oDMTM1N2lta25iBF9TAzk3MzU5NzE0BGdycElkAzE4OTYzMjk1BGdycHNwSWQDMTcwNTAwNjc2NARtc2dJZAMyMDczBHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTQ1NTUzOTI2NgR0cGNJZAMyMDcw> (4)

Visit Your Group <https://groups.yahoo.com/neo/groups/snobol/info;_ylc=X3oDMTJmYWNoZ2lsBF9TAzk3MzU5NzE0BGdycElkAzE4OTYzMjk1BGdycHNwSWQDMTcwNTAwNjc2NARzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzE0NTU1MzkyNjY->

Yahoo! Groups <https://groups.yahoo.com/neo;_ylc=X3oDMTJlMDQ0MzlyBF9TAzk3NDc2NTkwBGdycElkAzE4OTYzMjk1BGdycHNwSWQDMTcwNTAwNjc2NARzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTQ1NTUzOTI2Ng--> • Privacy <https://info.yahoo.com/privacy/us/yahoo/groups/details.html> • Unsubscribe <mailto:snobol-unsubscr...@yahoogroups.com?subject=Unsubscribe> • Terms of Use <https://info.yahoo.com/legal/us/yahoo/utos/terms/>

.

__,_._,___


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to