Coersing into a type
Julia Programming Language
Coersing into a type
Sorry but I don’t know a better term than coercing. Suppose that I read a set of strings and some times all of those strings can all be converted to InlineStrings.String15, which I prefer for performance, and some times not. What is the cleanest way to do this? Here’s one that I can think of, but I don’t like because I hate exceptions: s1 = ["kdjhfgksjdhfgkljsdhf", "lkjsdflskdflskdjflkfljs", "ldkfglkdfjglkdjfglkd"] s2 = ["dfg", "dfg", "hkfj"] maybeconvert(ss) = try InlineStrings.String1...
0 comments
No comments yet.