Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Experiences/guidance on teaching Python as a first programming language Date: Thu, 19 Dec 2013 18:39:35 +1300 Lines: 24 Message-ID: References: <20131212213602.806ef8fd2626ca6f34bc83d6@gmx.net> <20131216213225.2006b30246e3a08ee241a191@gmx.net> <20131217165144.39bf9ba1cd4e4f27a96893ca@gmx.net> <52b0fb4f$0$29973$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net qfDJmbpv6hzvPf7sHrXEiABVrtOvxVSs7NERuai6AOJVVK3fwj Cancel-Lock: sha1:ldOMCTIbiXnWAd+k9U5gDq8ZYz8= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:62374 Roy Smith wrote: > even > if you've got all the signatures of foo() in front of you, it can > sometimes be hard to figure out which one the compiler will pick. And conversely, sometimes the compiler will have a hard time figuring out which one you want it to pick! I had an experience in Java recently where a library author had provided two overloads of a function, that at first sight could be disambiguated by argument types. But for a certain combination of types it was ambiguous, and I was unlucky enough to want to use that particular combination, and the compiler insisted on picking the wrong one. As far as I could see, it was *impossible* to call the other overload with those parameter types. I ended up resorting to copying the whole function and giving it another name, just so I could get it called. -- Function overloading: Just say no. Greg