-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior
Description
Strings are immutable by interface even though manipulation of their underlying data is not prevented. This violates that abstraction:
julia> bytes = linspace(uint8('A'),uint8('F'))
[65,66,67,68,69,70]
julia> str = ASCIIString(bytes)
"ABCDEF"
julia> bytes[1] += 32
[97,66,67,68,69,70]
julia> str
"aBCDEF"
Here, changing a mutable object affects the state of a string object whose interface is immutable.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior