4 ms·
I literally just had this exact thought independently of you. I mean if you need to do something like this, doesn't that mean you should be writing code in a s
by vasilipupkin 9y ago
I literally just had this exact thought independently of you. I mean if you need to do something like this, doesn't that mean you should be writing code in a statically typed language?
- nerfhammer 9y agothere's a difference between should be and should have been maybe it's easier to do this half-measure than rewrite your entire code base
- vasilipupkin 9y agoI get that part, but for new projects, this perhaps is a hint to do things in Java?
- newfoundglory 9y ago80% of startups are going to die before their codebase reaches this size. They should probably not be making tech stack choices based on "what if we succeed beyond all likelihood".
- vasilipupkin 9y agotwo things come to mind: maybe those startups would die at a slower rate if their code was comprehensible to begin with ? but leaving that aside, for companies where survival is not an issue then, doesn't this indicate that using a dynamically typed language is not great?
- panopticon 9y agoI would be interested in seeing the number of startups that fail due to technical debt. My instinct is that most startups fail for business reasons (no clear need, not enough/right sales, poor management, bad pitch, solving the wrong problem, etc).
- depressedpanda 9y agoWell, in the case of Instagram, this just shows that Python was a great choice. They went with a dynamically typed language, were successful, the language they chose added an optional type hinting system, and they wrote a tool that would automatically type hint their code in order to reap many of the benefits of a static type system. I think that the amount of man hours that went into writing the tool is negligible, so it's a net win for Instagram.
- lmm 9y agoNew projects at large companies often are written in Java. New projects at startups aren't and shouldn't be - doubling future maintenance costs for the sake of a 20% reduction in development time now is a good trade, because 90% of startups fail, the important thing is to validate product/market fit as soon as possible. (Though really you should just use Scala and get both Java-like safety and Python-like productivity)
- Barrin92 9y agoThere's still a good deal of people who think of static typing as 'limiting', and dynamic typic as 'human'. Matsumoto said as much during (iirc) last years Ruby conf. I think the reverse is true. Static typing is liberating for humans because it tames complexity. Because I'm not a machine I cannot possibly keep track of fuzzy programs that arise from dynamic typing.
- jw- 9y agoI also get the impression that some people view using dynamically typed languages as a badge of honor, taking more expertise to harness the greater 'expressive' power, all whilst juggling the types in your head. Bad programmers can't use them properly, but if you're one of the good ones then you're not held back by rigid types. I'm one of the dumb ones and just let the computer do the checking for me.
- dmitriid 9y ago> Static typing is liberating for humans because it tames complexity. It doesn't, though. Not with the currently existing type systems and implementations. - Without type inference you end up righting multi-tier type declarations everywhere. - With overly powerful type systems you need something close to a PhD in math to create proper types and then figure them out half a year later when you've already forgotten most of what you did - Union and intersection types which are extremely valuable are missing from a lot of statically typed languages And because I'm not a machine I often cannot figure out what a yet another two-hundred multiline error message wants of me. Often I'm happy to just throw an `if (x && x.field){}` and be done with it.
- Barrin92 9y agoyou'll have to expand on this a little for me. I just recently looked at an older Haskell codebase I was working on two years ago, and simply because of a very few straight forward types, nothing special, I could really wrap my head around the code-base a lot easier. Not just because the code tells me in plain text what types occur where, but also because enforcing a strong type system encouraged compositionality and well-formed behaviour in the first place. If I look at some of the python code I've written, I'll be perfectly honest I often cannot tell you what to make of it any more.
- vorotato 9y agoDisclaimer, I'm a regular horn tooter for F# but imho this is such a perfect case for the language. It has similar line density to python, but with static type inference. Admittedly you will have to be explicit about using mutables, but I'm going to bet that instagram already cares about that.