<br><br><div class="gmail_quote">2009/9/25 Gerald Britton <span dir="ltr"><<a href="mailto:gerald.britton@gmail.com">gerald.britton@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think that the idea that there is a continuum from weak typing to<br>
strong typing is useful.  At the weak end, the compiler lets you do<br>
anything with anything without any declarations.  At the strong end,<br>
you have to declare everything and explicitly code all type<br>
conversions.  In practice I suppose, no compiler is completely weak or<br>
completely strong in this regard.  It's probably possible to devise<br>
some sort of metric to be able to place a given language on the<br>
weak-strong scale.  That's not to say that one language is better than<br>
another for being stronger or worse for being weaker.  They're just<br>
different approaches and philosophies and target different sorts of<br>
problems.<br></blockquote><div><br><br>The issue of type *declarations* is completely unrelated to strong or weak typing. Haskell is one of the strongest typed languages there is - but the types are usually inferred rather than declared. The compiler has a very strong notion of types internally. Strong and weak typing are to do with the way language treats 'objects' not how they are expressed in code (semantics rather than syntax). Even C# these days has a very limited form of type inferencing.<br>
<br>Michael<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Where would Python fall?  Probably towards the weak end.  Is that bad?  No way!<br>
<div><div></div><div class="h5"><br>
On Thu, Sep 24, 2009 at 6:54 PM, Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br>
> On Thu, 24 Sep 2009 07:04:46 pm Masklinn wrote:<br>
>> On 24 Sep 2009, at 01:40 , Steven D'Aprano wrote:<br>
>> > The world disagrees with you:<br>
>> ><br>
>> > […]<br>
>> > <a href="http://en.wikipedia.org/wiki/Weak_typing" target="_blank">http://en.wikipedia.org/wiki/Weak_typing</a><br>
>><br>
>> Not really:<br>
>>  > It is the opposite of strong typing, and consequently the term<br>
>>  > weak<br>
>><br>
>> typing has as many different meanings as strong typing does<br>
>><br>
>> Go to "strong typing" and you have a list of 9 different (and not<br>
>> necessarily compatible) definitions of "strong typing".<br>
><br>
> How does Wikipedia stating that there are many definitions of weak<br>
> typing support your assertion that "there is not [sic] definition of<br>
> weak typing"? I think it is disingenuous of you to delete the text of<br>
> yours I quoted.<br>
><br>
> The terms weak and strong typing are very common use in the real world.<br>
> If they don't have a single, formal, precise definition, that's too<br>
> bad, but it doesn't prevent them from being useful so long as we<br>
> remember that they are fuzzy terms. The English language is full of<br>
> words and terms with multiple definitions and fuzzy gradings. We manage<br>
> to communicate about relative differences in size quite well without a<br>
> single objective and precise definition of "large", and we can<br>
> communicate about relative differences in strength of the type system<br>
> of languages quite well without a single objective and precise<br>
> definition of type strength.<br>
><br>
><br>
><br>
><br>
> --<br>
> Steven D'Aprano<br>
> _______________________________________________<br>
> Python-ideas mailing list<br>
> <a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
> <a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<font color="#888888">Gerald Britton<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.ironpythoninaction.com/">http://www.ironpythoninaction.com/</a><br><br><br>