cur icon indicating copy to clipboard operation
cur copied to clipboard

define-implicit defines syntax and not procedures

Open wilbowma opened this issue 5 years ago • 5 comments

Constructors with implicit arguments are syntax and cannot be passed as values. This is a bit of a problem, as all constructors should be procedures.

wilbowma avatar May 27 '20 23:05 wilbowma

The function with implicit args would have to cooperate with #%app somehow.

It's doable, but then I think define-implicit would have to be part of the core and not a library?

stchang avatar May 28 '20 00:05 stchang

The library could extend #%app too, right?

wilbowma avatar May 28 '20 00:05 wilbowma

Yes, that might be ok but we could run into the diamond problem if a program uses this and another library that overloads #%app.

stchang avatar May 28 '20 02:05 stchang

Yeah, but then we could make a choice about whether to include it in the "core" to avoid diamond problems or not. In general, I want the code to enable as much independence as possible, but in the end I imagine we'll have a set of features that are included in #lang cur, and only people doing weird things or experiments would have reason to reach under #lang cur and avoid implicits, e.g.

wilbowma avatar May 28 '20 03:05 wilbowma

Sounds reasonable.

stchang avatar May 28 '20 03:05 stchang