News for hackers. Stuff that matters.
Re:Django 1.6 released by masklinn on Wednesday November 06, 2013 @02:42PM (#6684953)
> Nit-pick: suspect you are actually a fan of statically-typed languages.

And probably closer to "statically-but-not-too-statically-typed-because-really-more-than-my-language-of-choice-is-too-much" languages. Self-avowed fans of "statically-typed languages" (usually java or C#) rarely consider giving up nulls and casts.

Re:Django 1.6 released by meowface on Wednesday November 06, 2013 @03:14PM (#6685181)
In some cases, Java is more weakly typed than Python or Ruby.

Java:

System.out.println("abc" + 5); -> "abc5"

Python:

print "abc" + 5 -> TypeError: cannot concatenate 'str' and 'int' objects

Ruby:

puts "abc" + 5 -> TypeError: can't convert Fixnum into String

Re:Django 1.6 released by masklinn on Wednesday November 06, 2013 @03:35PM (#6685329)
And here we can see the issues and clusterfucks of the completely undefined and arbitrary "concept" of "weak" (conv. strong) typing: java's behavior here is well-defined, simple and statically typed, there's no more type loss than when doing `5 + 1.0` in Ruby or Python.

Why do you find implicitly converting an int (/Fixnum) to a float (/Float) more palatable, when they have completely different internal representations, domains of definition, precisions, operational semantics and potential pitfalls?

And what about Python's `"foo" * 3`? Hell, what about this:

    > class Fixnum
    >   def to_str
    >     self.to_s
    >   end
    > end
    => nil
    > "5" + 3
    => "53"
so "strongly typed" it has a protocol for implicit string conversion.

But wait, there's more without even bothering with overrides:

    > a = [1, 2, 3]
    => [1, 2, 3]
    > a[1.4]
    => 2
floating-point index to an array? no problem.