21

As outlined here, := may be used in scoping constructs like With to give delayed definitions, but this is undocumented.

This has been in the language since at least Mathematica 4.0. It is very useful and it does not appear to be "dangerous" that I can see. I cannot think of any good reason for this to have remained undocumented for so long.

Is there an argument to be made for hiding this important functionality?

user64494
  • 26,149
  • 4
  • 27
  • 56
Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
  • 3
    Have you asked WRI Support? :) – Kuba Aug 03 '16 at 11:47
  • 1
    @Kuba No. I like exploring things here more. Perhaps someone will give a reason I never even considered (this happens more often than I'd like!) and if not its visibility likely provides a greater impetus to WRI to document it than a simple suggestion from a random non-premium user. – Mr.Wizard Aug 03 '16 at 11:55
  • 2
    @Kuba p.s. (119915) Have you asked WRI Support? ;-) I still haven't come up with a good answer to that question but I intend to give it more thought. – Mr.Wizard Aug 03 '16 at 12:11
  • 1
    Doesn't this question fit perfectly the clause "The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional consultant."? Perhaps, if Leonid drops in and he is considered to be a professional consultant.... – István Zachar Aug 04 '16 at 08:56
  • @IstvánZachar You are welcome to vote to close. If the community wishes to close this question I will not treat myself as special and reopen it. I genuinely wonder if there is some reason, and in similar cases people have pointed out something I completely missed, or otherwise the question lead to important information. I am glad these were not closed: (58963), (59979), (89093) – Mr.Wizard Aug 04 '16 at 12:33
  • I would have voted to close weren't I interested in the answer. But I used this method to give you a push toward what Kuba has suggested : ) – István Zachar Aug 04 '16 at 13:26

1 Answers1

9

This now seems to be documented officially, see the Details section on With, since version 13.2. There was no obvious update to core functionality that might explain why it was added at that version change. So I guess it was either an oversight with very low priority, or something internal that we will never learn.

With[{x:=x0, …}, expr] inserts the unevaluated form x0 into expr.

Good that it's there after (at least) 23 years, v4 in 1999.

István Zachar
  • 47,032
  • 20
  • 143
  • 291