FAQ

On 02/19/2013 11:23 PM, Jan Mercl wrote:
On Tue, Feb 19, 2013 at 11:03 PM, Johann Höchtl
wrote:



Still ... everything happens exactly the way it is told to behave.
Which still makes the end results not a desirable result.


The compiler has no way to understand what is the 'desired' result in
this case. There are formally/structurally equivalent sane cases where
the desired result is the one obtained. This rules out the possibility
to make it an compiler error. Then there are cases, where a programmer
makes a mistake which misses the desired result. The compiler can never
ever discriminate the two situations and thus it is not rational to ask
it for doing that.
I agree. An error would be not the proper way to handle such a case. So
I hope that govet will give a warning about such cases one day.

Johann
-j
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2021 Grokbase