News for hackers. Stuff that matters.
Re:Yes, Python is Slow, and I Don’t Care by icebraining on Friday September 08, 2017 @10:13AM (#15200271)
what if that something must be between zero and one? A type can't tell you that.

Actually, it can, using dependent types :) I'm a Python fan, but Type-Driven Development with Idris has been a very interesting read.

Re:Yes, Python is Slow, and I Don’t Care by hellofunk on Friday September 08, 2017 @10:15AM (#15200290)
Yes but there are no mainstream or production-ready dependently typed languages, so I didn't mention that. But I wouldn't be surprised if dependent typing really is going to be the distant future of programming languages. Perhaps not too distant.

I also wouldn't be surprised if Clojure tends to do surprising things in this area with taking Clojure.spec more to the compilation stage; some of the most interesting research into type systems has actually be done by lispers (i.e. Typed Racket, Core.Typed) and there is active interest in it among the Clojure community.

Re:Yes, Python is Slow, and I Don’t Care by e12e on Friday September 08, 2017 @10:53AM (#15200618)
> Yes but there are no mainstream or production-ready dependently typed languages, so I didn't mention that.

(For a number-type that is limited to eg be between 0.0 and 1.0):

Ada?

http://www.adahome.com/rm95//rm9x-03-05-07.html

Re:Yes, Python is Slow, and I Don’t Care by hellofunk on Friday September 08, 2017 @11:10AM (#15200784)
Ada provides ranged types but is not a dependently typed language. So I guess it sort of falls into this particular example, but would not apply to other examples in this arena.