3 ms·
I think there’s this concept in language theory that those speaking or writing strive for more complex concepts as it matches better their thoughts, while those
by balder1991 3y ago
I think there’s this concept in language theory that those speaking or writing strive for more complex concepts as it matches better their thoughts, while those receiving strive for more simplicity as it takes more energy to make sense of complex concepts (think about it as adapting the language to your audience).
But I think the main problem here is the famous debate of statically-typed languages vs dynamic ones. As statically-typed languages add more and more features to be more expressive, they have to work around the compiler limitations and create very bizarre syntaxes if they want to keep performance.
But maybe this is a tooling problem? What if we could see the code in a simpler way even if the actual code involves macros and templates?
Swift has just implemented macros that Xcode expand to show the generated code in a collapse/expand way, making it easy to understand what it does.
- Firadeoclus 3y agoThis. Being able to expand macros lets you learn what it does in context, and once you're more familiar with the abstraction it gives you the benefit of hiding the details and highlighting the moving parts within an otherwise static structure.
- dannymi 3y ago>But maybe this is a tooling problem? What if we could see the code in a simpler way even if the actual code involves macros and templates? Intelllij Rust plugin does this. println!("Hello, world! {}", x); >Recursive expansion of println! macro: >{ > ::std::io::_print(IntellijRustDollarCrate::format_args_nl!("Hello, world! {}", x)); >}