|
I have another idea. Generally we want forbid meta modifications (and maybe reflection in general) from domain code. We can introduce special PS variable (kind of lock) which by default will prevent unintended modification with error message. So by default we will have: <code> aClass name: 'newName' "==> error with message like 'Modification is forbidden'" </code> And the code which really wants modify properties of meta objects should tell about it explicitly: <code> MetaModificationLock disableWhile: [ aClass name: 'newName'] </code> And for example refactorings will disable lock at the beginning of changes.
This approach will avoid all these private/basic/set messages. We will just fix implementation of setters with: <code> Class>>#name: aString MetaModificationLock execute: [name := aString] </code>
|
|
|
Priority: 5 – Fix If Time
|
|
Status: Work Needed
|
|
Assigned to: Everyone
|
|
Milestone: Pharo7.0
|
Go to Case
|
|