swift2 - Why does Swift not allow stored properties in extensions? -
i've been trying find best way implement stored property in extension, , came across question: swift extension stored properties alternative. however, have not found reason why in discussion or anywhere else. there reason why stored properties not allowed in swift? , if so, reason?
extensions extending functionality of existing class without changing memory structure. it's more or less syntactic sugar. imagine add stored properties , methods, be? nothing else inheritance. if add new properties , methods inherit class.
Comments
Post a Comment