Squeaky Clean could also be added under the Strings concept.
In clojure/config.json at main · exercism/clojure · GitHub it is mentioned that “Strings are a sequence of chars”. Since sequences are also a thing in Clojure, this statement will probably make people think that the language treats Strings as sequences, which is incorrect. Clojure strings are nothing more that Java Strings and the clojure.string functions are directly using the underlying Java methods to achieve better performance. So, i believe a clarification is needed.
So like, are they sequences, or not? I suppose they are from Java’s point of view, but since Clojure has a specific abstraction known as sequences we should choose a different word.
I’d rather not say “Clojure strings are Java objects” or the like, because it feels like a non-explanation.
Edit: Perhaps just a parenthetical note would work, i.e. (not to be confused with Clojure’s sequences), but it feels a bit clunky for a one-liner.
It’s impossible to know if the Java docs are talking about how a String is implemented or if they are just trying to explain what a String is. In any case, internally a Java String is stored as a byte array so we can say that it is in fact a Java “sequence”.
Now, the clojure.string docs mention that Clojure Strings are objects and that’s also true because they are only referring to the instances of the Java class String. They are not talking about the internal representation of Strings since this is Java specific.
Bottom line is that Clojure Strings are Java Strings (not Clojure sequences) . If someone wants to treat them as sequences they can call seq on them and proceed with the more idiomatic way of dealing with them. Many existing clojure functions already do that (filter, map etc). On the other hand, the clojure.string functions prefer to bypass the sequence abstraction and treat Strings as Java Strings for performance reasons.