3 ms·
>When I'm working in a dynamic language, my concept of type is consciously coming from all the static experience Because it's fun to have to constantly lookup
by moonchrome 11y ago
>When I'm working in a dynamic language, my concept of type is consciously coming from all the static experience
Because it's fun to have to constantly lookup API docs for whatever API you're using right now to get the exact spelling or naming convention for the class that you're using. And naturally we're all writing unit tests with 100% code coverage so none of those typos ever get in to production.
Dynamic typing works great with simple APIs. Once you have to deal with complex data graphs with heterogeneous types it becomes tedious at best (eg. a simple and well designed GUI library) or a major pain in the ass (eg. Blender Python API)
Oh and let's not even get in to pants on head retarded stuff like monkey patching as a part of regular API (eg. see WAF build system)
- icebraining 11y agoBecause it's fun to have to constantly lookup API docs for whatever API you're using right now to get the exact spelling or naming convention for the class that you're using. Nope, I just let my editor show me the available methods for the class. It sounds like you haven't tried programming in a dynamic language with a modern editor?
- moonchrome 11y agoI have - it heavily depends on the library you're using - it sounds to me like you haven't developed something like a GTK3 app with dynamically loaded bindings, blender extension or WAF build system plugin
- icebraining 11y agoNo, I didn't, but your statements were general in nature ("whatever API you're using right now"). Certainly there are exceptions, but they are not relevant for most of the work being done in dynamic languages.
- moonchrome 11y agoFrom my expirience those aren't the exceptions - it's pretty much half the time tools work and half the time they don't (anything involving native interop basically is a nogo, monkey patching or meta programming equally bad). It's nowhere near the level of support you get from even rudimentary type systems such as Java which can always resolve names and can provide strong refactoring. Why do you think even Python added optional type information and type definitions ala typescript and guys like jetbrains are rushing to support it ?
- icebraining 11y agoFair enough; in my experience, direct native interop (not using a wrapper), monkey patching and meta programming are all exceptions in the Python world.