classes are not bad per-se but the syntax being inspired by java is terrible, major downside is that you cannot have an async constructor and you are forced to use a custom static create function and you have to prevent people to directly use the constructor. They also play bad with typescript if you want to pass an object as param and then Object.assign(this, obj) in the constructor. I don't understand why svelte cannot auto generate getter and setter in case you return an object where one of the property is a state like: function createCount() { const count = $state(0); return { count // svelte could auto generate get/set and we can avoid classes } }