Rant after trying Rust a bit
Max Samukha via Digitalmars-d
digitalmars-d at puremagic.com
Mon Aug 3 02:19:24 PDT 2015
On Monday, 3 August 2015 at 06:52:41 UTC, Timon Gehr wrote:
> On 08/02/2015 09:02 PM, Max Samukha wrote:
>> On Sunday, 26 July 2015 at 23:29:18 UTC, Walter Bright wrote:
>>
>>> For example, the '+' operator. Rust traits sez "gee, there's
>>> a +
>>> operator, it's good to go. Ship it!" Meanwhile, you thought
>>> the
>>> function was summing some data, when it actually is creating
>>> a giant
>>> string, or whatever idiot thing someone decided to use '+'
>>> for.
>>
>> Number addition and string concatenation are monoid
>> operations. In this
>> light, '+' for both makes perfect sense.
>
> '+' is usually used to denote the operation of an abelian group.
The point is that '+' for string concatenation is no more of an
'idiot thing' than '~'.
More information about the Digitalmars-d
mailing list