sunshine@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 4 个月前I'm new to using Ruby and this tickled me pinklemmy.mlimagemessage-square77fedilinkarrow-up1213arrow-down17cross-posted to: [email protected]
arrow-up1206arrow-down1imageI'm new to using Ruby and this tickled me pinklemmy.mlsunshine@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 4 个月前message-square77fedilinkcross-posted to: [email protected]
minus-squareOriel Jutty :hhHHHAAAH:@infosec.exchangelinkfedilinkarrow-up0·4 个月前Does Ruby require the use of [] and {} there? Because those %w/%i/etc things look like custom quoting operators and at least in Perl you can use any delimiter you want: qw(a b c) is a list of strings, but so are qw+a b c+ and qw;a b c;.
minus-squareHelloRoot@lemy.lollinkfedilinkEnglisharrow-up1·edit-24 个月前Yes, but why? https://en.wikipedia.org/wiki/Principle_of_least_astonishment
Does Ruby require the use of
[]and{}there? Because those%w/%i/etc things look like custom quoting operators and at least in Perl you can use any delimiter you want:qw(a b c)is a list of strings, but so areqw+a b c+andqw;a b c;.Yes, but why?
https://en.wikipedia.org/wiki/Principle_of_least_astonishment