Rust Compiler Rejects JavaScript Habit
The rust compiler is insane. Like wdym you recognize the ternary operator just to say you can’t use it Ouppss ! Sorry my dear Rust Compiler ! Javascript habit... Compiling playground v0.0.1 (/playground) error: Rust has no ternary operator --> src/lib.rs:6:18 return a > b ? a : b
A programmer posts a reaction to Rust rejecting a JavaScript-style ternary operator. The joke is that Rust’s compiler recognizes the syntax well enough to explain the error, but the language simply does not support ternary operators. EN: A programmer posts a reaction to Rust rejecting a JavaScript-style ternary operator. The joke is that Rust’s compiler recognizes the syntax well enough to explain the error, but the language simply does not support ternary operators.
anime-style profile picture / аниме-аватаркаsocial media post / публикация в соцсетиcomputer code / компьютерный кодcode editor window / окно редактора кодаcompiler error message / сообщение об ошибке компилятораternary operator / тернарный операторRust programming language / язык программирования RustJavaScript reference / отсылка к JavaScriptdark mode interface / интерфейс в тёмной темеred error highlight / красная подсветка ошибки
- @ithueti / 15958 2025-05-14
- Type
- image
- Size
- 750×610 · 51.0 KiB
- Mood
- саркастичный
- Language
- en
- Added