FogBugz (Case [Issue]20322) Kernel - name: sent to a class SHOULD NOT automatically rename and destroy the class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FogBugz (Case [Issue]20322) Kernel - name: sent to a class SHOULD NOT automatically rename and destroy the class

Pharo Issue Tracker
FogBugz Notification
avatar
Enhancement in Project:  Kernel: 1. Pharo Image  •  You are subscribed to this case
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 Priority: 5 – Fix If Time Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Pharo7.0

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want FogBugz notifications anymore? Update your preferences.

FogBugz

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker