Re:Alan Kay and OO Programming
by dec0dedab0de on Tuesday May 21, 2019 @09:23AM
(#19969884)
Python IS strongly typed. ie: 1 == '1' is FALSE, and 2 + '2' raises an exception.
Re:Alan Kay and OO Programming
by AnimalMuppet on Tuesday May 21, 2019 @12:04PM
(#19971469)
So forgive jompe for using the wrong term. The point, however, was clear. It wasn't "strong vs weak"; the point clearly was "compile time vs run time". And, well, Python is, from jompe's perspective, on the wrong side of the line, no matter how "strong" Python's type system is.
Re:Alan Kay and OO Programming
by dec0dedab0de on Tuesday May 21, 2019 @01:56PM
(#19972755)
There is nothing to forgive, many people conflate dynamic typing with weak typing, so I thought I would point it out.
Whether or not a specific method of typing is good or bad depends on the project and the developer(s) working on it. But if you're going to use that as a reason to make decisions, then you should understand the difference.
Re:Alan Kay and OO Programming
by PunchTornado on Tuesday May 21, 2019 @01:36PM
(#19972484)
since python 3.6 you can use static types in python if you want.
I don't have any particular love for dynamic typing, but I really can't find a language I like developing in more than Python. I use type hints wherever I can so I (and others) know what the hell is going on, but I have yet to find a language as expressive and productive with so many great stdlib or community packages as Python.
I started futzing with Golang but I felt like I was always typing 50 lines to do what I could in 3-4 in Python. I might circle back as it matures more and there are more libraries.
Yeah, Go is that way on purpose. You're not meant to use magic that works mysteriously, but to be a bit "step-by-step" in your code, so it's obvious what's being done.
The article explains (very well) what the benefits of dynamic typing are, it's just that Python is a terrible language that spits in the face of Alan Kay's ideas. It's like someone went out of their way to create a language that would not be too paradigm shifting by discarding the crucial elements that Alan Kay keeps raving about and only choosing the most superficial with the only consideration being ease of use and popular appeal.
Try programming in Erlang, Common Lisp or Smalltalk. All dynamically typed languages. All meshing perfectly with Alan Kay's vision. All very different to Python. It's too bad that people's idea of "dynamic typing" has been - mostly - reduced down to Python and Javascript.
I wouldn't say current Smalltalk implementations mesh perfectly with Kay's vision. It's focus on class hierarchies and inheritance breaks with what Kay's initial vision was. That said, it's possible to write Smalltalk code favoring composition over inheritance or in a much more functional way that focuses on messages.
Re:Alan Kay and OO Programming
by PunchTornado on Tuesday May 21, 2019 @10:48AM
(#19970616)
I think you're confusing strong and dynamic. It's static vs dynamic and strong vs weak.
What would you say the benefits are with dynamic typing?