Skip to content
New issue

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

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

Already on GitHub? # to your account

Maybe dead code #2

Open
tinchodias opened this issue Aug 9, 2021 · 2 comments
Open

Maybe dead code #2

tinchodias opened this issue Aug 9, 2021 · 2 comments

Comments

@tinchodias
Copy link

tinchodias commented Aug 9, 2021

I'm listing some code to look at.

There is this class that seems to implement Null pattern:

Object subclass: #SpartaUnimplementedPathBuilder
	uses: TSpartaPathBuilder
	instanceVariableNames: ''
	classVariableNames: ''
	package: 'Sparta-Core-Builders - Unimplemented'

Only referenced from SpartaCanvas:

pathBuilderClass
	<return: #'TSpartaPathBuilder class'>

	true ifFalse: [ self subclassResponsibility ].	
	^ SpartaUnimplementedPathBuilder

UPDATE:

I discovered the class when looking at Code Critics and wanted to take note. But minutes later I realized there is a Package tag with many classes with this "pattern"... something to understand.

image

@tinchodias
Copy link
Author

In SkiaThreadedLibrary:

calloutAPIClass
	^ ThreadedFFIMigration threadedFFIAvailable
		ifTrue: [ TFCalloutAPI ]
		ifFalse: [ super calloutAPIClass ]

Where ThreadedFFIMigration doesn't exist

@tinchodias
Copy link
Author

tinchodias commented Aug 9, 2021

This class doesn't have any method, subclass, reference, or class comment:

Object subclass: #Sparta
	instanceVariableNames: ''
	classVariableNames: ''
	package: 'Sparta-Core'

In fact, the list of classes and traits in this situation is large:

image

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

No branches or pull requests

1 participant