> On Mar 29, 2017, at 4:14 PM, Brent Royal-Gordon <[email protected]>
> wrote:
>
>> On Mar 29, 2017, at 8:11 AM, John McCall via swift-evolution
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> I was suggesting that it would be a useful addition to the language, not
>> that it
>> necessarily needed new compiler support.
>
> Personally, what I'd like to see is for the existing <#whatever#> placeholder
> syntax to be treated as an unimplemented() call. That probably *would*
> require compiler support, although fortunately we already parse this syntax
> into an EditorPlaceholderExpr.
Actually, looking more closely, we already have this behavior in playgrounds
(and REPLs); it's only an error when you compile. Like, we literally do this:
// Found it. Flag it as error (or warning, if in playground mode) for the
// rest of the compiler pipeline and lex it as an identifier.
if (LangOpts.Playground) {
diagnose(TokStart, diag::lex_editor_placeholder_in_playground);
} else {
diagnose(TokStart, diag::lex_editor_placeholder);
}
Could we change the compile-time error into a warning? Would that require an
evolution proposal?
--
Brent Royal-Gordon
Architechies
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution