You probably know this already, but your question reminds me of how Ruby has two options for building certain arrays:
# the "conventional" way of creating an array of stringswords=["apple","banana","Leaf"]#=> ["apple", "banana", "Leaf"]# another way of creating an array of stringswords=%w(apple banana Leaf)#=> ["apple", "banana", "Leaf"]
I guess it's Perl inspiredsrc, but one limitation is that you can't create an array of numbers by the percent literal notation. Maybe that's a solution that you'd be interested in. Personally, I like having both options, and also think the "conventional" way should have commas.
You probably know this already, but your question reminds me of how Ruby has two options for building certain arrays:
I guess it's Perl inspiredsrc, but one limitation is that you can't create an array of numbers by the percent literal notation. Maybe that's a solution that you'd be interested in. Personally, I like having both options, and also think the "conventional" way should have commas.
That second one looks like a word splitting regex, or is it really a specialized syntax to create an array of strings?