On Sat, 15 Aug 2020 19:27:24 -0700 Guido van Rossum <gu...@python.org> wrote: > On Sat, Aug 15, 2020 at 7:14 PM Caleb Donovick <donov...@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.
Probably because exploiting Python abstraction facilities to build DSLs has/had long been frown upon in this community? That was the leitmotiv back when people were marvelling over Ruby's flexibility in the area. You can't fault people for remembering that theme. (arguably, annotations are a standard-enshrined DSL which even motivated unusual execution rules in the language...) Regards Antoine. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/DOLC3ERB4THG5NNUWC7BZAZ4CSX7IZSM/ Code of Conduct: http://python.org/psf/codeofconduct/