Better HN
topnewbestaskshowjobs
Log inSign up

rhymoid

5 karma · joined Jun 18, 2013 (13y ago) · 1 submissions

Submissions

comment 13y ago · link · parent

2. Enough languages don't conflate ring addition and string concatenation (in TIOBE order: C, Obj-C, PHP, Visual Basic (somewhat), Lisp, Ada, MATLAB, Lua). Furthermore, there are at least two "sensible" monoids on numbers (sum and product), but just one for strings (concatenation). `+` implies something more specific than a generic monoidal concatenation operator. Though I think `++` was a poor choice, one of many in the standard Prelude.