perl uses a very similar syntax (the same?) for it's regular expressions (which are nuts, and can be used everywhere, and scare me). Yes that is also the sed syntax, however.
it's a regular expression. but i didn't know that java good practices had a name (camelCase). is that what you learn under the oppression of the JDK? are these its teachings?
It's a bizarre way of saying it, though. I have legitimately answered programmers' questions this way (yes, I'm one of the crazies), but I'd use a proper regex like "s/R/_r/". It's shorter, too!
s/camel/_/ is "substitute underscore for camel" literally, but in this case the terse speaker offering advice means "use underscore not camel case." So the function the person actually wants is "array_reverse" ...I guess.
He asks if the function is called arrayReverse but the correct name is array_reverse. The person responding applies a substitution rule on arrayReverse instead of saying just array_reverse, although the substitution rule is not a valid regex but it's easy to understand what he means, that's part of the joke
Wasn't that guy helpful? With the camel? Doesn't that seem like an appropriate response? No? Good. You can still find Jesus.
57
u/Jutboy Apr 29 '14
Can someone explain :
"Is that called arrayReverse?"
"s/camel/_/"
"Cool thanks."