-
Notifications
You must be signed in to change notification settings - Fork 13
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
String1 docstring is incorrectly suggests that 1 byte is used to store the length #72
Labels
Comments
mkitti
changed the title
String1 docstring is wrong
String1 docstring is incorrectly suggest that 1 byte is used to store the length
Feb 15, 2024
mkitti
changed the title
String1 docstring is incorrectly suggest that 1 byte is used to store the length
String1 docstring is incorrectly suggests that 1 byte is used to store the length
Feb 15, 2024
nickrobinson251
added
documentation
Improvements or additions to documentation
good first issue
Good for newcomers
labels
Feb 15, 2024
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 12, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 12, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 12, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 12, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 12, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 12, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 12, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 12, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 12, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
KristofferC
added a commit
to KristofferC/InlineStrings.jl
that referenced
this issue
Jul 23, 2024
I was looking into fixing JuliaStrings#15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes JuliaStrings#73 Fixes JuliaStrings#72
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The following docstring appears incorrect.
One byte is not used to store the length of the string.
The text was updated successfully, but these errors were encountered: