Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think dicts themselves are the problem.

In typescript using plain JS objects is very straightforward. Of course you have to validate the schema at your system boundaries. But you'll have to do this either way.

So: If this works very well in TS it can't be dicts themselves but must be the way they integrate into- and are handled in python.

This leads me to the conclusion that arguments presented in the article might be the wrong ones.

(But I still think, the conclusion the article arrives at is okay. But I don't think there's a strong case being made in the article about wether to prefer data classes or typed dicts.)



This. I think types really make the difference here. You can get very far with just plain old JS objects as long as you've got strong types in place.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: