Replies: 5 comments
-
|
I think the
Here are some alternate ways to interpret things:
Regarding naming, perhaps there is only one person who knows the reasoning / history, but here's some speculation. This document offers some support for a connection between
Regarding
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks, @sogaiu . Is the idea that you can have multiple Can anyone provide an example where:
|
Beta Was this translation helpful? Give feedback.
-
|
I have used multiple As I understand it, that is one use. Breaking out of nested loops seems like another. Perhaps there are other uses too. Regarding use of May be the following from the official test suite will shed some light on the matter: Lines 86 to 100 in d7ea122 As I understand it, that kind of thing (i.e. the Currently, the docstring for
Perhaps the bit about The following Lines 77 to 82 in d7ea122 Note where the |
Beta Was this translation helpful? Give feedback.
-
|
@sogaiu , thank you for all the info! I see what you mean about how, for Ah, yes, the test suite is a good place to mine for examples. Hm. In that example from suite0008.janet:77, the Thanks for the links (above as well). Regarding the description of I think I probably need to learn and practice more with Janet macros, and also fibers, and then the source for Still though, I'd like to get a sense for when it makes sense to use |
Beta Was this translation helpful? Give feedback.
-
|
Regarding:
That reminds me of the following bit from the website docs "Special Forms" page about
Specifically, the last sentence sounds similar. As an aside, when I have time, I tend to favor code I find comprehensible (a criteria that can yield different results depending on who applies it, IME). As an example, one of the things I like about Janet is that one can use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to better understand how
prompt,label, andreturnwork.JanetDocs links: prompt, label, and return
@sogaiu (in a separate discussion) has pointed out that label is actually implemented in terms of prompt.
@bakpakin has pointed out to me on chat that
labelis lexically-scoped.Maybe to start off with: why is
promptcalled "prompt"? I'm not understanding the meaning here. (That is, it's not, say, prompting me for input). What is the rationale forprompt?Why is
labelthen named "label"? I've seen labels that I cangototo (I think Perl has these). Is it meant to mean that?In the docs for
promptit says i can return to the checkpoint (a keyword), but in the JanetDocs example that makes me think that the loop would run again. However, instead of that it breaks out. What does "return to" mean in the docs forprompt?Beta Was this translation helpful? Give feedback.
All reactions