Programming Language Features I'd Like Most Languages To Have
Tuesday, January 10, 2023
Here are some things I am dissappointed to leave behind when I switch back and forth between languages that dont have certain features.
If Expressions Found in: Rust; probably other functional languages Irritatingly missing from: Everything let x = 5 + if true { 1 } else { 7 } println!("{x}"); // 6 What I have to do instead:
let x = 5; if true { x += 1; } else { x += 7; } System.Console.WriteLine($"{x}"); Ternary Found In: Everywhere except Go Ternaries are like If Expressions but less powerful
…