News for hackers. Stuff that matters.
Re:Static types in Python by minitech on Friday October 14, 2016 @01:12PM (#12709534)
I’ve gone that route in Haskell and it works great. Yes, you need to extract the string again. Not an issue unless you’re golfing all your code. You also don’t need to hide the real constructor if it’s a type your module should be working with.

Subclassing str seems like the most horrible way ever to represent an e-mail address. I would definitely write a wrapper instead – exactly like Haskell.

There are no comments on this comment yet.