How Rust and C See Strings
How We See Strings Rust C &str String &[u8] &[u8; N] Vec<u8> &u8 OsStr OsString Path PathBuf CStr CString &’ static str char *
A woman labeled Rust and a man labeled C point toward a spectrum of string-related types. The joke is that Rust distinguishes many kinds of strings and byte representations, while C sees them all more simply as a char pointer. People send this as a programming joke about Rust’s detailed type system versus C’s low-level approach.
woman / женщинаman / мужчинаteal dress / бирюзовое платьеwhite shirt / белая рубашкаblue jeans / синие джинсыgreen shoes / зелёные туфлиblack shoes / чёрные туфлиpointing gestures / указывающие жестыmulticolored vertical dots / разноцветные вертикальные точкиtype list / список типовcurly brace / фигурная скобкаtext labels / текстовые подписиwhite background / белый фон
- @profunctor_io / 6950 2021-08-01
- Type
- image
- Size
- 576×680 · 43.6 KiB
- Mood
- sarcastic
- Language
- en
- Added