Rant after trying Rust a bit
Idan Arye via Digitalmars-d
digitalmars-d at puremagic.com
Thu Aug 6 02:15:23 PDT 2015
On Thursday, 6 August 2015 at 06:54:45 UTC, Walter Bright wrote:
> On 8/3/2015 2:19 AM, Max Samukha wrote:
>> The point is that '+' for string concatenation is no more of
>> an 'idiot thing'
>> than '~'.
>
> Sure it is. What if you've got:
>
> T add(T)(T a, T b) { return a + b; }
>
> and some idiot overloaded + for T to be something other than
> addition?
Having add("a", "b") return "ab" is not that weird. But consider
this: http://pastebin.com/R3csc5Pa
I can't put it in dpaste because it doesn't allow threading, but
here is an example output:
45
45
45
45
45
45
45
45
45
45
MyString("0361572489")
MyString("0379158246")
MyString("0369158247")
MyString("0582361479")
MyString("0482579136")
MyString("0369147258")
MyString("0371482569")
MyString("0469137258")
MyString("0369147258")
MyString("0561472389")
More information about the Digitalmars-d
mailing list