Comment

Comment by joshdavham

> Positional arguments means a caller can use MyDataClass(1, 'foo', False), and if you remove/reorder any of these arguments, you’ll break those callers unexpectedly. By forcing callers to use MyDataClass(x=1, y='foo', z=False), you remove this risk.

This is an awesome way to prevent future breaking changes!

...but unfortunately, adding this to an existing project would also likely result in breakings changes haha

parent joshdavham 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton