Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need to have id in BlSpace, BlTask and BlParallelUniverse #639

Closed
tinchodias opened this issue Oct 23, 2024 · 3 comments
Closed

No need to have id in BlSpace, BlTask and BlParallelUniverse #639

tinchodias opened this issue Oct 23, 2024 · 3 comments

Comments

@tinchodias
Copy link
Collaborator

Instances of BlSpace, BlTask and BlParallelUniverse are initialized like this:

initialize
	super initialize.
	id := UniqueIdGenerator generateUniqueId.

where this id is an integer and the generator is initialized on class-side, like:

initialize
	UniqueIdGenerator := BlUniqueIdGenerator new

(each of the 3 classes has it's own generator).

I propose to remove this, as it mostly adds noise to the code. Pharo and Smalltalk objects have identityHash and this should be more than enough for a developer to identify instances while debugging, reading logs, etc.

@tinchodias
Copy link
Collaborator Author

Related:

@tinchodias
Copy link
Collaborator Author

@plantec @labordep I'm not talking of removing BlElement's ids. I think element id makes sense, and I think they are used in Toplo and Stylesheets. But what's your opinion on ids on BlSpace, BlTask and BlParallelUniverse?

@labordep
Copy link
Contributor

Hi @tinchodias, I agree with you :-) I use it to identify an instance during debug but if the hash is working this is the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants