shiika icon indicating copy to clipboard operation
shiika copied to clipboard

MutableString should inherit String

Open yhara opened this issue 4 years ago • 1 comments

class MutableString : String

yhara avatar Dec 23 '20 02:12 yhara

Hmm, this seems to be wrong. When you write def foo(s: String), you are expecting s to never be changed. So inheriting String is wrong; It should use something like Ruby's Module.

yhara avatar Dec 27 '20 08:12 yhara