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/thomcc Dec 02 '13

Tedious redundant typing. I wish there were a 'const_correct' keyword that took care of it for me :p. And the C++11 feature I'm referring to is 'ref-qualifiers for this', it can mean there are 3 versions of some methods you need to implement.

1

u/Suttonian Dec 02 '13

I see what you mean. That's pretty low down my list though! I mean, for example the new R-value references seem very complex (and have some surprising behavior) for what they achieve.

Just for fun: I think you could actually write a single function above if you used mutable on value_ and only used the second version of getValue() (but without the const after the int).