HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-23 days agoWhy make it complicated?lemmy.mlimagemessage-square121linkfedilinkarrow-up1368arrow-down139file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1329arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-23 days agomessage-square121linkfedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squareAnotherPenguin@programming.devlinkfedilinkEnglisharrow-up3·3 days agoAt least in C#, you can define variables with keyword names like this: var @struct = “abc” I think in Kotlin you can do the same, and even include spaces with backticks like val abstract class = “abc” I’m not sure if other languages allow that, regardless it should be rarely used.
minus-squarepivot_root@lemmy.worldlinkfedilinkarrow-up3·3 days agoSwift also uses backticks and Rust has a dumb one in the form of r#thekeyword. Still much better than introducing a async as a new keyword in a minor version of a language and breaking a bunch of libraries.
At least in C#, you can define variables with keyword names like this:
var @struct = “abc”
I think in Kotlin you can do the same, and even include spaces with backticks like val
abstract class
= “abc”I’m not sure if other languages allow that, regardless it should be rarely used.
Swift also uses backticks and Rust has a dumb one in the form of
r#thekeyword
. Still much better than introducing aasync
as a new keyword in a minor version of a language and breaking a bunch of libraries.Python?