Live CEOing Ep 725: Language Design in the Wolfram Language [Manipulating Held Expressions]

Stephen Wolfram's team discusses two language design problems: Optional patterns with Shortest sometimes matching nothing unexpectedly, and a proposed ImmediateEvaluate wrapper that would force evaluation when substituted into held expressions. Both need clearer semantics before moving forward.
Chapters
Sam.
Okay. Hello, everyone. Welcome to another Wolfram Language design review, part of our Language Completeness and Consistency series. And looks like we have seemingly two straightforward topics, except that I know neither of them are straightforward. Let's start off with this optional + longest, shortest.
Right? So there was a user complaint about the interaction of optional with longest and shortest. And sort of digging into this, you know, I think there's sort of two, two main behaviors at play here. The first is when you have shortest around an optional, it always prefers to.
Use.
The default, which, you know, is, you know, a little questionable, but, you know, see, right. Seems to be.
Okay, hold on. What is the basic point here? Is this an interaction between longest, shortest and options pattern? An options pattern, or is it. You're talking about optional.
I'm talking about optional. Okay, so if you. And now the particular case that the user's user was interested involved both optional and options pattern. But before we dig into his example, I think we should.
Has nothing to do with it. And it's optional and shortest and longest.
Right? So if you, if you open up the shortest example, you'll see sort of.
I sent you. Is this the example I sent you?
That is the. Exactly the example you sent me. And I used replace list rather than just a function definition just so we can see that, you know. Right, Just so we see that, right, there are multiple matches pattern, you know, multiple matches possible. And you know, sort of the question is, when you're writing a function definition, obviously the first one is used. So if you. Right. So here, you know, you have a function with an optional. Right, It's X is null blank sequence with a default value of true. And if you, you know, call f on it, then the preferred match is binding X to the empty sequence because null blank sequence will match the empty sequence and then binding X to true. Now if you wrap that pattern, Let.
Me just understand that. Okay, so to match F of no arguments, the preferred possibility. I don't understand. I don't understand.
Can I explain when, when it uses optional, it is first using the pattern.
And then deciding to fill something.
Deciding not the pattern. And in here the pattern happens to match nothing. So that that's what matches. I don't know if that's helpful, but that's right.
But the point is that optional is post filling. Once the thing has matched the pattern, then it's like, yeah, no, I'm sorry. No, no, no, I'm wrong, I'm wrong, I'm wrong, I'm wrong. In this case, the pattern matches nothing, but also the Case where it ignored the pattern completely and just went to the optional. Is that second case correct?
That's correct.
Okay.
Right. Now if you wrap that optional in shortest or. Or if you involve shortest in the pattern with optional, then it decides to completely ignore the pattern and just go straight to default value.
It reverses. It reverses the. That choice.
Yes.
Which seems sensible.
Why?
Because shortest of optional will try matching the case where there's nothing there first. I mean, I didn't write this, but I don't think this is crazy.
Right? I don't think it's crazy. It's possibly arguable, but it's hold on, isn't it?
If we switch this, wouldn't longest either be inconsistent or have a different problem? The equivalent problem.
The basic point is shortest is preferring the match where it is the very shortest thing which is the non thing as in the thing which eventually goes to the optional. Correct.
Correct. Yes. That's a true statement.
Okay. And then longest. I don't know. Can we not do this exact same example?
We could. I think longest would have basically no effect. Right. Because it'll.
Right. That's what I would expect.
Yep.
Okay. So shortest knows that a non thing is shorter than anything else.
Right. Except that's not literally true.
Right? Right.
In this case it happens to be the same length as the actual match.
Correct.
A case probably not imagined when this code was written. Okay.
Right.
Well, I don't have a big objection to what shortest is doing in this case.
No, I. I don't. I think we should put this as notes or something in shortest.
Yes, we should. What about longest?
Right. So the, the. Well, I guess we can look at this example first. So if you wrap in. Right. So basically if you wrap the. If the. Sorry. If the optional comes first. So. Right. I have two arguments here.
Yep.
If the optional thing comes first, then longest has no effect. I guess basically because right things to the specifications to the left have higher priority then specifications to the right. If the optional thing comes later, then it has an effect. So you see the first two are the same, but the second two it has changed the order of the. Of the first two matches. Because.
So go ahead.
You're right because in the first two examples it's the X that has the default value and in the last example it's Y that has the default value. So when you try to wrap. And notice in particular here I'm wrapping the thing that's not optional and longest.
So I would expect in that last case that it's going to make that Y is going to be bound to the non thing. That's not what happens.
Well, because Y matches the empty sequence. Right. So the. The false gets eaten up by the X because X is now longest and then Y is perfect. Y is not wrapped in longest or shortest. So it's perfectly happy to just bind the empty sequence to Y.
And I will do nothing.
Right. But if you wrapped it in shortest, then it'll give you that. Which is kind of weird, but consistent with the discussion we've had up till now.
Yes, I see the shortest. So the main thing to note is that for shortest, the non thing is shorter than any things. Does that make sense? Shortest will prefer a non thing to anything even if that thing is an empty sequence. Right. I think that's explainable.
Yep.
Yeah. It's specific to shortest and optional.
Yeah.
But I think it's consistent and the code carefully implements this. So somebody thought.
Okay, well, I think there's nothing further to discuss here. I think we should consider this. Fine. But requiring that additional clarification in the documentation.
Right. I just wanna, I mean the one thing that's, you know, worth pointing out, but I think, you know, I don't think we're going to change this, but if you look. Right. So the user was specifically interested. Interested in the case where, you know, he has an optional argument and then options pattern and he tried to make it longer by wrapping it in longest and it had no effect. And, and I. Well, I guess I. That's. I guess, you know, that's the same.
Phenomenon or something different.
That is the same phenomenon. Right. Because the.
Oh, I see. The options pattern prefers. No, I'm confused. If it was wrapped in shortest, I understand. The option pattern prefers going to the optional case rather than having any content.
Right. So options. Well, options pattern is like null blank sequence effectively in this particular case. Right. It. It matches zero or more option specifications. So, you know, but you know, a rule matches blank also. So when you just do X blank comma true, sorry, colon true, then that still matches X blank. Now you can wrap the first argument in shortest to get sort of the, you know, force optional things into ops.
You know, I wouldn't have expected that. Longest. Oh, I see. Longest you might have thought would crush the X down to being its optional case.
Correct? Right, exactly. That was the user's expectation.
Okay, so explain to me why that's okay. But it doesn't do that.
Right. Because the.
Was left to right max matching. Isn't that the reason?
Yeah, basically.
Because if it was the other way around, I Think it would do it?
Yep. Well, I guess we. I guess we can test that, but I'm pretty sure based on all the examples we've looked at thus far, that would be my expectation as well.
That isn't doing it, is it?
Well, right.
He.
I guess. I guess the point is that. Okay, so I guess this is a little. So maybe there's also an issue with longest and shortest and options pattern. Although I claim that the very first example where we had longest of ops colon options pattern, if OPS was null blank sequence, we would have the exact same behavior.
I'm a little confused by that second case there.
Which input are you referring to in 40?
This one. This one here?
Yeah. Well, I think that option, I mean, whether.
Well, it made an options pattern as long as possible. Right.
So, yeah, the options pattern is matching something is grabbing something from first and then the sequence.
Oh, oh, no, no. Oh, no, no, no. Well, we. We didn't reverse the things. We're looking at us backwards. Right. So X. X. Right. X is grabbing. Yeah. X is still grabbing the rule in all these cases.
I know. Which is surprising to me.
Yes.
In this case here, I would have expected that the longest of options pattern would grab the whole rule.
Longest is not modifying the optional.
Yeah. So that is possibly.
No, the option, not the optional, the options pattern.
So the longest of the sequence, options pattern, I think here is just the sequence that is not modifying the optional. The optional is matching first.
Yeah. Yeah. Yes. Right. I think this is arguably wrong. I think the other behavior we've seen is not wrong. But I think the interaction with longest and shortest with options pattern needs to be looked at.
Right. Yeah. I guess the thing is that options pattern almost always goes at the end. Right. And.
Well, I would think you could put a sequence in there if. If you want to. And.
Yeah. Can we copy that in a 14 and change options pattern to a null blank sequence or give it a name?
Yeah.
Yeah.
Delete that. Yeah. I mean, do trouble.
What is this? What are you talking about?
Do trouble Underscore.
Yeah, that's what I would have thought.
So it's the same.
Hold on. Yeah. Which is arguably wrong. I don't understand this.
So maybe. Maybe. Well, then. Right. So maybe the statement that. Well, I guess it's the statement that when you have an op, an optional, which is not explicitly wrapped in shortest, then it prefers the non.
Yes, I think that's what's happening. Yes.
It refers the unwrapped thing.
Correct.
I don't think this is right. I can see no argument for N23 being right.
Well, I'll tell you what the argument is. I'm not saying whether this is correct. In this case, the optional is working first.
I know. I don't think it's right. I don't think it's right.
Right. But then what's the argument for having a different behavior when it appears in the first sl?
What are you saying? What.
So copy that down and reverse.
Right. Or.
Or discuss the first case we had here.
Right.
I think that one's arguably wrong as well. I mean, I could argue for that in terms of a left right thing, but I think it's not really that convincing. I think there's a case that we just haven't considered very carefully. Is the crushing of length based on something being an optional. I think this deserves more investigation. I don't think it's the most important thing, but I think. I don't think this is right.
So I guess the question is why were you okay with the argument that, you know, things that are not wrapped in optional prefer the thing first? Because. Because that was a one argument case.
Optional.
Right. So like with, you know, when we just looked at the shortest example in. In the. In the exam in the section titled shortest example. Right. So in this case it preferred to bind F to null blank sequence. But then when we explicitly wrapped it in shortest, it preferred the default value.
Yes, but this is a different case because in one case we have competition between a shortest or longest and a nothing, and the other case we have the decision within a single object. Which would it prefer? I think they're different. I think this requires more investigation. I think it's possibly not quite right.
Okay, let me point out that if. If you. If you. If you took optional out of the equation. So that was X null blank sequence and you know, ops null blank sequence. I believe you'd get the same behavior.
Which one?
So take.
The.
The very first input there and make it X triple underscore and OPS triple underscore.
Just here X. Yep.
And.
I mean, this isn't defined. What it did is a little weird, but it certainly isn't defined.
I thought we said we match the shortest thing by default, which is what's happening here. So X matches the shortest thing like nothing. And then whatever's left over has to go to ops. Put shortest around ops, Right?
Yeah, that seems right.
Right, but if you put longest there, right, it would not make any difference.
No, you'd have to put longest around the first thing. Right.
Let's just check. Oops. Longest. Okay, but if we put longest around the first thing.
Yeah.
Then it will force. I'm just. For the hell. I just want to see if it does both of them, but. Okay, fine. That's fine. Those are fine.
That sounds fine.
Right. And I think, I think if we did options pattern instead of null blank sequence, we would get the same behavior. But it's when you. It's. Yeah, it's right. It's when you stick in the optional that we get this discrepancy. I guess because it prefers to try to. When it's not explicitly wrapped, it prefers to try the, you know, the, the something as opposed to the nothing.
All right, I think we've got some stuff to look at with options pattern, but other than that, this looks okay. Okay, let's move on. This is an important topic here.
Right. So last time we start.
Last time was a while ago. Right, Right.
And it was. You're like, oh, we need to, you know, we need, we need. Chris, you know, we need people and we need to spend the whole meeting on this. So it's, this is a little less than a whole meeting, but.
All right.
I've just sort of collected, you know, things from our previous discussions, but I, you know, you clearly want to take this in some direction, so I'm going to let.
No, I mean, the main thing is there's code and you want to manipulate it. That's the main thing. So you've got a piece of code and you're trying to tweak the code in some way without it blowing up in your face.
That's a very vague.
I know. What is immediate evaluate immediately, which you put into a held expression. So I could say held of immediate evaluate.
No, it's something that you could put into. Like a rule. Yeah. Into a pattern. So when it's substitute. When you substitute it in. Right. So you know, do hold of two. And. No, no, no, no, no.
Well, yeah, this is the one that would become hold of four.
Well, I mean, I, I suppose it depends on what conventions we would come up with for, you know, what, what, what attributes immediate evaluate would. Would have. Right. I mean, if, if you just did. Or, or is that. Oh, that's a rule delayed, which I can't quite. Is that rule delayed that. I can't quite see this.
Can I. Do I need to make it bigger?
Ok, now I can clearly see that it's a rule delayed. Ok. Yes. I mean, I think. Right. That. Of course that's, That's a really boring case because you already have in the thing. Right. All the Information. The more interesting case is hold of two. Slash dot X goes to, you know, X blank goes to immediate. Immediate evaluate of X blank squared.
Yes.
Right. So you know, which, I mean, this particular, you know. Right. Of course you can do that with, you know, with. And slash semi, but. Right.
Well, but with slash semi, you have to test the match explicitly. You can just use the pattern matcher.
You can use the slash semi with the pattern matcher. I mean, I.
Right.
I mean, it's kind of cumbersome. Right. But. Right. You can achieve the same effect. Right.
Yeah, obviously you can.
Right.
But this seems useful. And is it semantically clear. We did.
I'm sorry, we did green light them previously.
No, I understand. So this applies. This does. Evaluation upon substitution, basically. Right.
Yep.
Which is not quite what you'd expect immediate evaluate to do.
Right. And. Right. I think this was going to be sort of more. I. It's been long enough that I don't remember all the details, but. Right. I think this was going to be sort of much more general than just Right. Pattern matching. Right. If you wanted to use it with say, map. Right. Because. Right.
So you could get it into. You could insert it into a place where it would not normally be evaluated. I mean, the problem is if we had something like hold. Of x plus. Well, give me just hold of X. Right.
I mean. Right. If we have hold of two and we map hash squared over that.
Look here, if we say immediate evaluate. Actually, let's do one and two here. Okay. Just to see what will happen here. That's this case.
Well, remove the, Remove the braces around. Oh, I guess you're going to rely on the stability. Okay, fine.
I think the ampersand should be inside the immediate evaluate.
Yeah, that. That was going to be the. Right. The convention.
I'm totally confused. So this is.
Right. So, so, so remove in. In the previous input. Remove the immediate evaluate. So we, we. We know we're looking.
That behavior is not useful because it's just going over those things.
Well, maybe it's not useful for you. I critically rely on this behavior all the time.
Okay.
Right.
So that's the thing. Which we would like to have some way to get it not to do that.
Correct. And so if we wrap the first argument and immediate evaluate, that would tell.
The substitution system.
Well, the, the. Well, it will tell map to run ival on, you know. Right. When it copies the experts rather than just copying and, and sticking the head to I eval each expression so that the result is evaluated. Yes.
Right. But how general is that? Phenomenon of you have. You've got a function and it stuffs a completely value in and that new value, but it is into an environment where, you know, where it's been, where it's being held.
I would say that's pretty general. I mean, everything in the map family, you know, everything in the replace family. I mean, it's explicitly listed in the notes that. Right. It first sticks things in and then allows normal.
Yeah, I know. Okay, there's. Are there any other kinds of functions other than the map and replace family that do that? Structural functions of this kind that go into something else? I mean, I don't know, something like grouping. Does it do anything like this? I don't think so. I think most other functions, they create a thing for themselves. The main point here is that they are inserting into something. Well, replace part certainly does this.
Right. Which I would say, I mean, that's somewhere between map and replace, but it's generically within the map and replace family.
Right. So the whole point is that the semantics here would be immediate evaluate causes it upon insertion to do it. So it's evaluate upon insertion.
Correct.
It seems like a very useful thing to me. I mean, I certainly use it. Now, is there any kind of quoting? The unquoted quoting, you know, is any kind of weird. It just doesn't evaluate. It evaluates only when it gets the signal. I've just been substituted.
Right. So I think the quote. Well, I mean, I don't know how this would work. I haven't thought through if there's sort of multiple levels of quoting that we might want to worry about. But generically speaking, The.
I think the question is really this. If you do this and then you do it again, it's already blown itself up. Right. The first time you do it, it's going to evaluate. So if the thing inside it, if it contains another immediate evaluate, that's fine. That will. That will just be left as an immediate evaluate. The immediate evaluate. Its only operation is to do. Don't we have some kind of release AT type functionality? I mean, if I said here, map AT releasehold. In that comma 1, 2.
Nope.
We'Re out of luck. It can't do anything.
Correct.
Do we have any such functionality?
No. I mean, the closest thing you could do is, right, you could do replace at and you know, use a rule that basically forces it to evaluate.
Right. But I mean, that would also be potentially useful is to have a release hold which has a part number in it.
That would be more useful. I think this, whatever we call It.
Well, except. Well, I mean. Well, I don't think. I don't think a release hold with a part number in it works. Because unless you're saying. Oh, you're saying you. You would apply it from the outside.
Yes.
Okay, you're right, because I was going to say releasehold can only work from the outside.
It's like evaluate at. It's like map at, but it's evaluate.
Yes.
But this immediate evaluate, whatever, it's slightly problematic. I mean, what about in with or lambda evaluation or something?
Well, that's the question. Does that count as substitution?
Seems like a huge set.
No, no, no, wait a second. What counts as substitution? That's the big question.
Everything. Everything.
No, no, wait, wait a second. So we first said that it is the, you know, map family, the replace family. Okay. Now what's being raised is could it also be the function family?
Yeah, with.
Okay, let's look at With.
I don't understand why with is relevant here.
I mean, with literally X equals immediate evaluate of the function and then X bracket, you know, five or something. Inside a hold. Right. So then write hold of, you know, X. Yeah, yeah, right. Function or something that sort of.
Yeah. That particular case, does it evaluate or not? Probably the answer is yes.
I would argue that the immediate evaluate does not disappear. I, I would, I would claim that, you know, immediate evaluate is a hint. Is a hint to. All right, so what's your example?
X to F and put the thing inside the immediate. Yeah. Change that to F and put a lambda. Put a function inside, you know, slot plus two, slot plus two ampersand. Put the ampersand inside the immediate evaluate.
I don't understand that at all. Right.
The wrapper for hold of F bracket 3F. Yeah, three. Right. So should that, you know, sort of evaluate. Should the immediate evaluator or whatever we call it, trigger there.
Right. And. No.
I mean, I'm just saying, I think there's an endless stream of the. These cases.
Okay, so let's understand why this doesn't evaluate.
Because it's not in the first argument of map or on the.
Right.
But I think that's not general enough. I mean, if here you put this immediate evaluate, it becomes the F here.
Yeah.
It would return hold of immediate evaluate of slot plus two ampersand of three.
Right.
I mean, no, and I claim that that immediate evaluate should evaluate because it is. It was placed by a substitution process.
Well, but, but, but. Right, but, but that by, by that logic, I mean, if you did immediate value 8 of, of that thing of anything. Right. It'll.
I mean, okay, the question is what event counts as substitution?
And we know that we, we had a very bright line which was, you know, this was going to be a hint to various functions that, you know, you insert things into existing structures which was, you know, you know, map, star, replace, start.
I know, I know, I know, but I think there's more to this. I mean, I think that the, the concept is, I mean.
It'S the same with like supplied. We don't expect supplied around an F to still function as an F just out in the wild. No right to map or whatever it's used in.
What's your point here?
That immediate evaluate of a function is, is not something that should be treated as equivalent to that function outside of particular immediate evaluate.
Okay, look, look. Semantics, possible semantics. If the immediate evaluate. Is the outermost wrapper of a thing which is inserted, then do evaluation on the thing and evaporate the immediate evaluate.
I think the question is, what's the definition of inserted?
I know.
Does with, does with insert or does with construct?
Yes, with inserts. In my opinion, I claim many of these functions do the equivalent of inserting, but they should do nothing unless the immediate evaluators at the top level. And so this wouldn't work. But for example. Oops, What did this do? Oh, just jumped somewhere else. Okay.
That example that you have your cursor on. Now I'd like to point out that I think that your intended semantics for immediate evaluate here would be equivalent to the current behavior without immediate evaluate, because you would evaluate the pure function and then substitute that pure function where you.
See F. I know, I know. So it's good. So it's gonna look like this.
So with already has an implicit immediate.
Evaluate, the width does. But look, look, look. Yes, it's just gonna do this. Okay, that's what it's going to come out with. And that's just going to sit there unevaluated.
So the immediate evaluate evaporates.
But in this case, yes, it does.
But that's, you know, absolutely not what we want to happen, right? I mean, the point is, when we use the point of immediate evaluate, there is to, you know, end up with five.
I know, but it's not the right way to use immediate evaluate.
Then how do you use immediate evaluated?
Math.
Hold on, hold on, hold on, hold on, hold on, hold on. I don't think you can do it in this case. I don't think it works in this case because it has to grab something bigger than itself.
Well, I was comparing with, to like the equals and the width is like the rule in a replacement, so.
I know, but it's not keeping.
Look, I'm trying to clarify Jeremy's question. Sorry.
So in the.
In the replace family, the right hand side is wrapped in immediate evaluate quite separately from that. In the map family, the function is wrapped in immediate evaluate.
This would work, but this would not work. Immediate evaluate can only cause evaluation. So claim immediate evaluate can only cause evaluation in its subtree. Okay, you're asking it in this case to do more than just cause evaluation in its subtree.
I don't follow that at all.
Okay, so let me explain again. Okay, so my point is that in this case, you are substituting the. Look at this. This is what happens. That immediate evaluate there turns into this here. You see what I'm saying? That. Sorry. That that substitution turns into this here. Evaluation evaporate because it does evaluation at the moment when it is substituted. Here's its rule. I am substituted. I will now evaluate myself. That's what it does upon. Upon substitution, it evaluates itself, not something outside its subtree.
Because that's what it does right now, without an immediate evaluation.
I know it's not useful in this case. I'm not claiming it's useful. I'm just saying the semantics of immediate evaluate is. But, but substitution evaluate your subtree.
But.
But, but how is that different from the case where we mapped immediate value aid of pound plus two across hold of one, comma two. Right. Type in.
Hold on, hold on, hold on. Let me look at that case. Immediate evaluate of hash plus two.
Yep.
Ampersand.
Yes.
Comma old one, core two. Yep.
Well, and then, and then, you know, let's.
No, no, not a B. I mean, I guess it won't make a huge difference, but let's have one and two instead of A and B. Yeah, yeah.
Okay. But you agree with my last argument, right?
I do agree. I do agree, yes.
I mean.
Evaluate it hit shift enter.
It's not going to do anything because of the immediate evaluation.
It is. There's a map. It's going to do something.
All right, all right. Okay.
It's done. Its substitution.
No, no, no. This happened in the wrong order because the whole.
Right. Well, how's that different from which.
You're right, you're right, you're right, you're right.
Yes.
The problem is.
Let me try to add an idea here. I think this is about intersecting something in the middle between matching and inserting. Immediate evaluate happens before insertion. It's just that in root delayed, for example, we have Match, insert and then evaluate. We want something that is match, evaluate and insert.
Right. Now match, insert, evaluate. That's the usual that's redelate rule would.
Be evaluate, match, insert.
Yes. So what we want now is match, evaluate, insert. Except that this case is grabbing something.
Right. So. So instead of map, do replace at. At, you know, at level two. Right. Take that exact same input, change map to replace, and you know, make the first. Well, I guess it. I guess we'd have to reverse the arguments. Yeah. So, yeah, X blank goes to immediate evaluate of X blank plus 2.
X plus 2.
Yep.
I just figured. Measure. I'll do this.
Right. So immediate evaluate would give us six and seven.
Because it's a subtree. That's a fairly clear case. The case that isn't clear is this grabbery case.
That's correct.
Yep.
They're different. They're different examples.
Well, I agree that they're different examples, but I think it's not a.
Well, we could do something by saying immediate evaluate has a sub value.
But.
Then it wouldn't work in hold complete. Actually, it wouldn't even work in this case because of the list.
No, no, no. Immediate evaluate has a sub value. Look, you've got this thing it produced. Oh, I see, I see. You're saying the immediate evaluate has to do its evaluation. It has to do subvalue evaluation.
Yeah. If it were to be a subvalue, would have to do subvalue evaluation. And then that doesn't work inside hold complete. And it. Yeah, and it might not work depending on where the hold is relative to it.
Okay, but the key point here is we've got different cases. We've got the substitution. The genuine substitution case, Which by the way also applies to with, is a genuine substitution case.
And in the case of. With what if it's not with X equals immediate evaluate of something of hold of X, but rather with X equals immediate evaluate of if some condition, comma, blah blah blah blah blah, X blah blah, blah blah blah, where X is buried inside one of the clauses of the F.
What about it? I mean, it will do the immediate evaluation. It will. At the time when it does it, it will decide which branch of the if to take.
That's if there's even a branch of the if that it can take. Right. If the condition doesn't evaluate to a boolean and there aren't four arguments.
All right, so look, let's just understand what else we've got here. But this is. We have not solved this. Go ahead.
Sorry, I had to step out For a second. So I'm not sure what conclusion we came to, but I don't.
We haven't solved the immediate evaluate problem. There seem to be two different things we want it to do. Well. The substitution case seems fairly straightforward. The function application case seems fraught with difficulty and we don't see how to do it.
And why, you know, why is hint to map not a clear case? I mean, that. I'm pretty sure it could be that. That is, I mean, that is sort of what. I'm pretty sure that's what we concluded last time.
Okay, but then the other case is not a hint. The other case is that you can just do it.
No, you have to do it inside of a replace. Right.
But what's the case without the replace? Look, this case is not a hint to map. This case is a. Does this case work or not? Hint to where?
Well, I would, I would claim that this case does not work. I, I don't, I just don't understand why, why we're thinking this case should work.
Because it's the same as the map case, basically, correct?
No, I think it's the replace case. I think that's a rule expressed as a set.
So.
But it is a rule that. It is a rule that changes the head. Yeah, it's a rule that changes the head. There is the additional step of inserting things in the hash that's done immediately by the replacement. So it's very different.
I don't understand that comment.
Let's just look ahead for a second. At what? Oh my gosh.
Right.
So I mean, we talked about another version that did substitution of lambda functions but didn't evaluate in some meeting previously.
Right. So I mean, other things that, I mean, things we wanted to. Oh, okay. So. Right. So maybe immediate evaluate was only for pattern matching.
You know what, let me make a suggestion. Okay.
Okay.
We're not going to get this solved today. And we've. This, this, these notes are a little bit of a mess. I think we need someone at I being one of the, at least one of the people to just go through this and try and enumerate what the cases are, because we've got, you know, more stuff here we've got.
Right. So I mean, the things we want to discuss are apply withholding. I mean, if, if, if, if in the previous discussion you'd actually allowed me to set the agenda and I was.
Just reading your agenda, but go on.
Yes, well, I, I had every, I included everything because you.
Because what should we be discussing?
Because you jumped all over the place. But, you know, the thing was apply withholding, which, you know, I, I guess was something that was sort of the, you know, dealing with what was something you had, You know, something you had suggested.
That's a different thing again.
Right? Yeah, there. There are a lot. There are lots of. There are. There are lots of things here.
Let's, let's try to clarify again, pull these things together. And, you know, and let's pick this up at a different time because we're not going to get the solved today.
Nope.
Okay. That's. That's all we can really do here. But let's try to pick this up again soon so we can really push forward on this. We need to get this solved. I think it's going to get squiggly before it gets unsquiggly. I think it's going to relate to things like the package format. God knows what else, for what it's worth. Okay, well, let's wrap up here for today.
Okay.
Thanks all. See you soon.
See you.
Bye. Bye.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






