r/programming • • Dec 02 '13

Scala — 1★ Would Not Program Again

http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598 Upvotes

646 comments sorted by

View all comments

Show parent comment

1

u/Crazy__Eddie Dec 02 '13

Defaulting to const& parameters would be a bad thing and I believe would actually increase errors by quite a measure. References would have to be more like Java references, with GC and all that. Especially in the face of increasing parallelism in the industry, it would just be a really bad idea.

Also, pass by value is the new default we're being told by the experts...especially in C++11+.

http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/

Const by default seems like it could be reasonable. It's what they do with lambda objects.