On Sat, Aug 15, 2020 at 7:14 PM Caleb Donovick <donovick@cs.stanford.edu> wrote:
>  To me, the main weakness here is that you couldn't move forward with this unless you also got the various static type checkers on board. But I don't think those care much about this use case (an inline notation for what you can already do with a class definition and annotations). And without static checking this isn't going to be very popular.

You underestimate my willingness to generate python files which could be consumed by static checkers via a preprocessing step.   Also, my real goal is to abuse type hints for the purposes of my DSL.  But DSL is a nuaghty term on the list so we won't mention that :)

Fine, so the use case you claimed was fiction. If you had just said "DSL" instead of "anonymous protocols and dataclasses" you would have gotten straight to the point and we would have been talking about whether extended subscription would be useful for DSLs (I can see various use cases), rather than arguing over whether Struct can be spelled with () instead of [] (a total waste of time).

In fact, I don't know why you think "DSL" is a naughty term. (I find "runtime use of annotations" much naughtier. :-)

--
--Guido van Rossum (python.org/~guido)