5 ms·
That is exactly how I always feel when working in Clojure. Constant "what is this? What's in it?" You can't just say "it's a map". Sure, it's a map, but there'
by mathw 8y ago
That is exactly how I always feel when working in Clojure. Constant "what is this? What's in it?"
You can't just say "it's a map". Sure, it's a map, but there's data in there I want so can you at least tell me what keys it's supposed to contain? Sadly the language has nothing to help me make up for the lack of documentation other than inspecting values at runtime inside a half-constructed program and this just doesn't feel very efficient compared to returning a defined data structure with specified properties.
- coldtea 8y ago>this just doesn't feel very efficient And yet people could run circles around static typing programmers using Lisp, Smalltalk and other dynamic languages to build programs faster and iterate on them quicker. Except if you mean "doesn't feel very robust", which I'd somewhat agree.
- agumonkey 8y agoIt's always a matter of system theory. You can have the fastest native code ever, if your system is suboptimal then it's almost moot. That's why people prototype in python or whatever (lisp and smalltalk decades ago), because they can design the system right and then tighten the organs with native code.
- iceninenines 8y agoGradual typing is the usual workaround for making dynamic langs more like static ones.
- phyrex 8y ago> Sadly the language has nothing to help me Except that is the whole point of spec. Yes, it’s not available for all libraries, but can always add it when you need it, and you don’t need it that often.
- serpi 8y agoAt this point you introduce schema.core and gradual typing. No need to blame the language when there is a solution for this.
- bsaul 8y agoAt which point do you consider it OK to NOT use typing for a library, or any piece of code that another programmer is going to have to use or maintain ? I think basically never ( even for throwaway code, because they often end up being reused). So i’d much prefer a language for which static typing is not an afterthought..
- Skinney 8y agoPretty much always. I mean, as a frontend developer I'm dealing with an untyped api all the time: the backend. We've written pretty huge software using many untyped services, and we're doing fine.
- lkitching 8y agoWho is using gradual typing in a clojure codebase? I've never seen any usages of core.typed in the wild. Using schema is more common although its future seems uncertain in the wake of spec. In my experience schemas require just as much effort as specifying types without the benefit of automatic checking or the usual IDE integrations like navigation or autocompletion. As a result they're rarely used widely enough to be useful.
- F-0X 8y agoThis is how I feel generally when working with codebases which make copious usage of type inference. I hate it, and think it is simply counter-productive in most cases. Though most other developers scoff and this and can't understand why I'm happy to write "unnecessary types". I long for a language where types are mandatory and on the left. But not Java <10.