> Again sorry if I’ve misunderstood, but why is it impossible?
The difference is run-time vs compile-time checking. If you need more, read back up for the explanation I gave Julian, or try it out in another language for yourself.
That’s not the same as impossible. Given SC is soft-typed interpreted language, let’s say I find that argument less compelling than you seem to (same goes with ‘invoking the interpreter for such a simple task’), but we can agree to disagree I suppose.
> What you are talking about is not a literal. 0x11 is always the same thing.
So is the "Value = " in f"Value = ${value}". Obviously, the whole thing is not a literal. But, the literal value that is produced by that _expression_ is different from the literal value produced by plain "Value = ${value}", just like the value of the literal produced by 0x34 is different than the value of 8r34. Yes, parts of how it works are new, but stylistically it's not that different from these other prefix-based literals.
If you want a precedent, I’d say a closer one is the collections variants. e.q. [ ] vs IdentityDictionary[ ]. If you’re totally opposed to a method approach I’d prefer InterpString”…” or something like that, as at least that looks like existing collections variants. Remember, the criticism was not that it's new in some way, just that it doesn't match "existing conventions and style.”
Well, put generally the very first point I made in this thread is something like don’t put an unnecessary burden of learning and complexity on users unless the benefit is very substantial. This is especially true when talking about syntax variants and/or duplicating functionality.
This would be good maxim to include in a guide…
Anyway, I’m not opposed to adding this in some form, I just think it should be as easy to learn and understand as possible. At the moment I think a method approach, using the back end Julian mentioned would be most generally useful.
S. |