On Mon, Nov 16, 2009 at 4:26 PM, David Pollak <[email protected] > wrote:
> Speaking of warnings, which do you prefer (see patch below): > >> >> 1) Explicit types on val extractors (as it is today) >> 2) One-liner with no types (proposed) >> >> We could save 4 warnings... >> > > Here's the cost of the 4 warnings: > > If you remove the type information and the lazy calculator thing changes > how it does calculations, you'll silently get changed types (this has > happened before) and that breaks things. On the other hand, if we leave the > code with explicit types, we'll get a match warning (with the type erasure > stuff turned back off) if the type change. > You get breakage if the types change in an incompatible manner in both cases. I don't see how you get any added safety by adding the types explicitly. In both cases, the compiler has the same information about the types and perform the same amount of type checking for you. alex -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
