in reply to Re: why are hex values not numbers?
in thread why are hex values not numbers?
I think you should investigate why the substr built-in is named "substr" and not "substring", "subStr", "subString", "sub_str", "sub_string" or any of a large number of other possibilities.Alas, even the shortest of these (substr) is way too long to be competitive at code golf. As a golfer, I wish Perl had used a built-in operator rather than the substr function for string slicing. This is one of the very few areas where Python trounces Perl at code golf, as discussed in detail at Re: Drunk on golf: 99 Bottles of Beer.
Quite apart from golf, I miss Python's concise and powerful string slicing operator when coding in Perl and feel string slicing is a common enough operation to warrant a very short "Huffman-coded" way to do it -- especially given "things that are commonly used should be shorter/more succinct" is one of Larry's language design principles. I also find it odd that Perl supports built-in array and hash slices, but not built-in string slices.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: why are hex values not numbers?
by Your Mother (Archbishop) on Sep 28, 2016 at 13:50 UTC |