- About Scala
- In the Enterprise
- Scala Community
- Language Research
- In the Press
- The Scala Team
- Scala's Prehistory
- Contact Us
- Learning Scala
- Tour of Scala
- Scala API
- Setup & Getting Started
- Programming Guides
- Other Guides
- Code Examples
- Scala Developers
Re: Re: Time to encourage meaningful type parameter names? Discuss
Mon, 2011-11-21, 02:36
On 11/21/2011 11:32 AM, John Nilsson wrote:
> On Sun, Nov 20, 2011 at 11:42 PM, Tony Morris wrote:
>> * forall x y. reverse(x ::: y) == reverse(y) ::: reverse(x)
> OTOH, there is no way you can be reasonably productive if you need to
> do the kind of deduction required read this property and be confident
> that it the one you need.
> I would guess that what really happens is that you study this property
> once or twice until you are confident. Then you memorize that the
> function named "reverse" in fact has this property, and what this
> property means for the applicability of that function.
> The next time you need to reverse a list you will rely on your memory,
> and not the ScalaCheck enforced test, to select this function as a
> solution and move on.
> I believe that it is an accepted fact that memory is a very poor
> evidence for what is actually true.
> So in reality you choose either to believe that your recollection of
> verifying the function property is correct, or you can choose to
> believe that the person who named it "reverse" did the same
> verification for you and manage to pick a reasonably intelligent name
> to communicate this fact to you.
Yep, you're well-understanding the mild utility of names instead of
conflating names with the process of deduction of the algebraic
properties of functions. Now, how do we tell the other guys who insist
on screwing it up?