--
You received this message because you are subscribed to the Google Groups "reactive-demand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reactive-dema...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hmm. I suppose it might be possible using some combination of v, V, and D. I'll see what I can do.
What's the motivation for this as a primitive? It seems like you should be able to implement X using the existing operators. That said, this strategy of asserting structure seems like a good idea.
--
On Mar 20, 2014 8:17 AM, "Matt McLelland" <mclella...@gmail.com> wrote:
>
> So this is analogous to code that looks like this?
>
> x = ...
> if false
> foo x -- "assert" that we're allowed to call foo with x
Yes, effectively.
>
> Seems kind of hokey.
>
Why so?
>Why so?
Well, that was more of a gut reaction, but thinking about it more, it's because you're introducing real code, even if it is just a dead branch, as a round about way of providing annotations for the type checker. I'd rather see something more direct:
x = ...
assert well-formed (foo x)
Or something like that. Can you not have something like
assert : a * (a->Prop) * e -> a*e
And then allow the construction of Props to do type level introspection type things?
--
Well, that was more of a gut reaction, but thinking about it more, it's because you're introducing real code, even if it is just a dead branch, as a round about way of providing annotations for the type checker. I'd rather see something more direct:
x = ...
assert well-formed (foo x)
Or something like that. Can you not have something like
assert : a * (a->Prop) * e -> a*e
And then allow the construction of Props to do type level introspection type things?
One implementation for X is:X = vvrwlcVwrzDVR[c]?W[c]?LCl
In the context of program execution, we might say that `&p` "succeeds"
if `p` can be applied to the environment, but does not actually apply`p` to the environment. `!p` "succeeds" if `p` cannot be applied tothe environment, and again leaves the environment unchanged.This has the same "dead code assertion" feel as the `X` operator, butit's handled at a lower level, and more explicitly.
understanding your description correctly, the semantics of `X` do not
actually require the implementation pay any attention to codeexecuting on the left branch at all
an argument for making these and `|` deterministic (i.e. make`|` ordered choice and banning backtracking in general).
> The ‘extreme human’ approach we are trying to adopt can be summarized> as follows: we do not allow our programs to do anything that a good> human mathemati- cian wouldn’t do.