Last active
October 12, 2020 13:26
-
-
Save olekscode/8131c924c622c83221de4f5d8dc62c18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"In Pharo 7" | |
methods := Smalltalk image allClasses flatCollect: [ :aClass | | |
aClass methods ]. | |
signatures := methods collect: [ :method | method name ]. | |
fileReference := '/Users/oleks/Documents/Data/Methods/signatures7.ston' asFileReference. | |
fileReference writeStreamDo: [ :stream | | |
STON put: signatures onStream: stream ]. | |
"==================" | |
"In Pharo 8" | |
methods := Smalltalk image allClasses flatCollect: [ :aClass | | |
aClass methods ]. | |
signatures := methods collect: [ :method | method name ]. | |
fileReference := '/Users/oleks/Documents/Data/Methods/signatures8.ston' asFileReference. | |
fileReference writeStreamDo: [ :stream | | |
STON put: signatures onStream: stream ]. | |
"==================" | |
dir := '/Users/oleks/Documents/Data/Methods/' asFileReference. | |
signatures7 := (dir / 'signatures7.ston') readStreamDo: [ :stream | | |
STON fromStream: stream ]. | |
signatures8 := (dir / 'signatures8.ston') readStreamDo: [ :stream | | |
STON fromStream: stream ]. | |
signatures7 := signatures7 asSet. | |
signatures8 := signatures8 asSet. | |
same := signatures7 intersection: signatures8. | |
removed := signatures7 difference: signatures8. | |
added := signatures8 difference: signatures7. | |
removed size / signatures7 size asFloat. "0.05904114760286901" | |
added size / signatures8 size asFloat. "0.1549608190703126" | |
"14% of methods in Pharo 6 are not in Pharo 7" | |
"19% of methods in Pharo 7 were not in Pharo 6" | |
"6% of methods in Pharo 7 are not in Pharo 8" | |
"15% of methods in Pharo 8 were not in Pharo 7" | |
"5% of methods in Pharo 8 are not in Pharo 9" | |
"13% of methods in Pharo 9 were not in Pharo 8" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment