Aktuelle Änderungen Printable View Änderungen Bearbeiten
ObjectRelationalMapping > ObjectFunctional > ObjectOriented > ObjectOrientedness > ObjectOrientedness > ObjectOrientedProgramming > ObjectRelationalMapping > OccamsRazor > OnBlogging > OpenSource > OperaBrowserScripts > OperaOnAStick > OperaRssFeedsExtractor > OperaUserScripts > Operas > Opera > OptionalStaticTypingClear TrailUsing static typing to ensure code reliability is silly in a language with side affects, particularly one that lets you dynamically alter classes at run-time. The slightest change of state can effectively nullify the benefits of static typing. All static typing will do in python is decrease the flexibility of the syntax.
What kind of disappointed me is that what he described can be implemented right now using decorators, with only a slightly different syntax. You couldn't infer typing by parsing the source, but parsing Python source is always a horrible way to find out stuff about the code.
To programmatically understand Python code, you run the code, that's just the way it is, and that can work fine if we all just come to terms with that -- not only work fine, it is a real asset of Python.
Starkiller is speed by replacing function calls with static function calls according to the actual types that are fed to the function. For instance, if a calculation is fed either integers or floats in the course of a program, then two calculations, one for integers and one for floats can be substituted and they will both be fast.
It’s not about name, it’s about behavior, which means it’s about interfaces. More than that, it’s about constraints, and the ability to express them in a clear way, or as fans of Eiffel will call them, pre-conditions and post-conditions.
The illusion of safety that comes with static typing is just that, an illusion. Are Java programs less buggy than Python? Not likely.
I’m not sure static typing would have been useful at all, given our dependency on dynamicism to pull off the tricks. Interfaces, on the other hand, are amazingly useful at documenting and exploring what you want to be there.