Why are people always worked up about "Rust has multiple string types" but not "Rust has multiple array types" or "Rust has multiple pointer types" or ... which are analogous and in a way consistent
-
Show this thread
-
Is it because "too many string types I can't even" was already a meme from C++
1 reply 0 retweets 3 likesShow this thread -
Replying to @glaebhoerl
no it's because everyone thinks strings are simple -- most languages just have string. Many have [T; n] vs Array vs ArrayDeque vs LinkedList ...
2 replies 0 retweets 11 likes -
Replying to @Gankra_ @glaebhoerl
Joe Groff Retweeted Tim Sweeney
@TimSweeneyEpic’s comment here echoes something I’ve thought. Languages like C++/Rust/Swift that heavily correlate type to representation tend to have a blowup of typeshttps://twitter.com/timsweeneyepic/status/935422065825472512 …Joe Groff added,
3 replies 0 retweets 2 likes -
Replying to @jckarter @TimSweeneyEpic
How is it possible to not correlate them? Do you know good examples of (statically typed) languages which don't? I always felt this was likely necessitated by fundamentals. Like if you say two things have the same type in one way but not in another, you're gonna have a bad time.
5 replies 0 retweets 1 like
This isn’t a perfect illustration, but Haskell typeclasses defines operations that can be performed on families of (representation) types, and C++ templates can be structured to do similarly.
-
-
These are resolved at compile time and don’t introduce any “representation abstraction” overhead at runtime.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.