Feature request: Path append operators for strings

Paulo Pinto pjmlp at progtools.org
Fri Jul 5 08:04:46 PDT 2013


Am 05.07.2013 16:59, schrieb TommiT:
> On Tuesday, 2 July 2013 at 23:28:41 UTC, monarch_dodra wrote:
>> On Tuesday, 2 July 2013 at 21:48:54 UTC, Walter Bright wrote:
>>> On 7/2/2013 1:47 PM, TommiT wrote:
>>>> Division operator for strings doesn't make any sense,
>>>
>>> That's why overloading / to do something completely unrelated to
>>> division is anti-ethical to writing understandable code.
>>
>> s/division/"The common agreed upon semantic"/
>>
>>> The classic example of this is the overloading of << and >> for
>>> stream operations in C++.
>>
>> Or overloading ~ to mean "concat" ?
>
> It's rather C++'s std::string which overloads the meaning of + to mean
> "concatenation". I wonder if some other programming language has
> assigned some other symbol (than ~) to mean "concatenation". I guess
> math uses || for it.

Visual Basic uses &
Perl and PHP use  .
Ocaml uses        ^

Just from the top of my mind, surely there are other examples.

--
Paulo


More information about the Digitalmars-d mailing list