Re:GorillaScript
by rm445 on Sunday July 07, 2013 @09:06AM
(#6001904)
I have always liked ~ for string concatenation. Looks like a little string tying the strings together, and hardly likely to be confused with the bitwise not operator.
[ Parent
| on HN ]
Re:GorillaScript
by cameronkknight on Sunday July 07, 2013 @08:06PM
(#6004218)
I thought about it, but for the most part I used `~` as a way of referring to something in an unstrict way, e.g. `~+` doesn't typecheck, it just adds and auto-coerces both operands to a number.
I didn't want to have `~` mean string concat because it overloads the semantic meaning of what `~` would represent.
I actually stole `&` from VB, as well as `\` as floor division.
Where is a ~ used for string concatenation?
D uses it too. I think they use it for array concatenation as well.
Re:GorillaScript
by theOnliest on Sunday July 07, 2013 @10:41AM
(#6002128)
Perl 6 does...I can't recall anywhere else, though.