Hacker News new | past | comments | ask | show | jobs | submit login

What do you mean "the type of strings"? In pretty much every programming language, String is one of the most fundamental types. There's no "different types of string".

(yes, this is a joke, a bad one at that. badum tish)




When I worked at Google, they had their own string type in place of std::string for various reasons.

Python has byte strings, Unicode strings, format strings, regular expression strings, and probably a few others!

Rust has str and String, depending on ownership.


honestly the difference between basic types like String in different contexts in different languages and dbs is enough to give me ptsd lol


> Rust has str and String, depending on ownership.

Why I hate Rust


C++ has string and string_view. Python has memoryview. It seems like a necessary evil if you don't want folk working in raw pointers?


In some languages it's two or more of the fundamental types. Obviously you haven't been using the big brained languages like Rust, Haskell, or Elixir.

(Also a bad joke.)


Obviously you haven't seen the Substring [1] type of Swift.

[1] https://developer.apple.com/documentation/swift/substring


But this is a slice. So technically a []char?


Not really. It's only a reference to the original string, a start index, and an end index. It doesn't store a second (partial) copy of the string.


there's String, string, std::string, and the satanic *char. Just like there's Slinky, Super Slinky, Extra Slinky, Heavy, and Pro. Nickel-wound (ref counted), steel wound (raw array), and classical nylon (a fucking pointer).


What are gut strings then? Indexed addressing?


lol, those would be raw pointers as well but at the asm level with registers. Joking aside, gut strings are extremely rare outside professionals. I’m not surprised to see it mentioned with this crowd. Cheers for tickling this music nerds interests.


Meh, "text" is where it's at. "varchar()" is so Oracle. :p




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: