On 27.11.2017 12:01, Sebastian Rittau wrote:

The major changes from the previous version are:

- Add InitVar to specify initialize-only fields.

This is the only feature that does not sit right with me. It looks very obscure and "hacky". From what I understand, we are supposed to use the field syntax to define constructor arguments. I'd argue that the name "initialize-only fields" is a misnomer, which only hides the fact that this has nothing to do with fields at all. Couldn't dataclassses just pass *args and **kwargs to __post_init__()? Type checkers need to be special-cases for InitVar anyway, couldn't they instead be special cased to look at __post_init__ argument types?
I am sorry for the double post, but I thought a bit more about why this does not right with me:
I hope I did not misunderstood the purpose of InitVar.

 - Sebastian