News for hackers. Stuff that matters.
Re:Pyre: Fast Type Checking for Python by dragonwriter on Monday May 14, 2018 @07:46PM (#17070438)
> And unfortunately, the design decisions made for those operators don't extend to anything else written in the language.

Yes, it applies to a number of built in functions and other operators beyond the mathematical ones.

And there's no reason they can't to even non-built-ins. When you implement a method or function, you can adopt a similar special-method-based protocol for it's arguments, and define the appropriate special methods (monkey patching existing classes, if necessary) for the acceptable types.

> If "strong typing" is to mean something about the language, it should it should apply to more than a handful of built-in operators.

I suppose there is a difference between a language with a weakly typed core (where you cannot avoid the risks of weak typing without isolating the core), one with a strongly typed core that doesn't force user code to be strongly typed (where Python sits), and one that forced strong typing (which probably had to be static, as well).

Re:Pyre: Fast Type Checking for Python by zenhack on Monday May 14, 2018 @09:51PM (#17071004)
> I suppose there is a difference between a language with a weakly typed core (where you cannot avoid the risks of weak typing without isolating the core), one with a strongly typed core that doesn't force user code to be strongly typed (where Python sits), and one that forced strong typing (which probably had to be static, as well).

Yeah, fwiw I do think that the distinction being made with javascript vs. python is meaningful, it just isn't really about the language per se, but rather the design of "built-in" functions, which often doen't need to be built in as far as their semantics are concerned.

In my comment to the sibling, reiterate the reference to julia/racket -- you could have a language feature that does dynamic checks at the call site. IIRC, Haskell's GHC has a flag to basically compile down any time errors to exceptions (I don't know that anybody uses it though).