LateFunctionBinding indicates that the function has a binding which is not known at compile time. This is useful for functions which have side-effects or are not deterministically computable. The implementation is supplied at evaluation time as a functions.LateBoundOp within the function namespace
()
| 1084 | // The implementation is supplied at evaluation time as a functions.LateBoundOp within the function |
| 1085 | // namespace of the activation, and is subject to the same runtime type-guard as an eager binding. |
| 1086 | func LateFunctionBinding() OverloadOpt { |
| 1087 | return func(o *OverloadDecl) (*OverloadDecl, error) { |
| 1088 | if o.HasBinding() { |
| 1089 | return nil, fmt.Errorf("overload already has a binding: %s", o.ID()) |
| 1090 | } |
| 1091 | o.hasLateBinding = true |
| 1092 | return o, nil |
| 1093 | } |
| 1094 | } |
| 1095 | |
| 1096 | // OverloadIsNonStrict enables the function to be called with error and unknown argument values. |
| 1097 | // |