4 ms·
The dynamic typing crowd is frankly just flat out wrong at this point and someone has to say it - so, thank you Tom. This is especially apparent with advancemen
by lucasyvas 3y ago
The dynamic typing crowd is frankly just flat out wrong at this point and someone has to say it - so, thank you Tom. This is especially apparent with advancements of type inference in compiled languages.
Beyond initial prototyping (which I doubt will actually ever be thrown away), what logical defence is there for catching obvious bugs in production when they could have been caught at compile time instead? Dynamic typing straight up hides unavoidable realities of programming - you have to know what thing you have to cover all the cases. I don't just mean cases that "make the compiler happy". These cases are most often not mutually exclusive from the business domain - cases related to core business logic are missed, which produce more bugs which makes your software objectively worse for both the end user and whatever business the software is sold by.
The complaints I hear are that it's too cumbersome or annoying to satisfy these cases - my retort is to stop complaining because most of us are paid to write working software, not software we can pass off as being complete when it's not.
And don't suggest that tests cover this - they absolutely don't, and testing such things is a total waste of time. The train has left the station, best get aboard.
- PaulHoule 3y agoA counter is that nothing has replaced Python for data science. I mean, Julia has talked a good game but gotten very little traction.
- lucasyvas 3y agoI would argue this is a false equivalency. The explanation is that Python is too entrenched to replace, not that it is somehow superior for this use case because it is dynamically typed.
- PaulHoule 3y agoWell... I'd phrase it like "no statically typed language has proven it is superior or even applicable for this use case yet". You can't say Julia hasn't given it a serious try and hasn't gotten first-rate marketing treatment by being name checked in "Ju-Py-Ter" notebooks and other placements. Instead, Julia has serious deficiencies https://news.ycombinator.com/item?id=32806179 https://news.ycombinator.com/item?id=32806179 It's certainly not proven a static language can't cover this use case but in other areas static languages really have proven their merit.
- lisper 3y agoNo one is against static typing. This thing that some people, myself included, oppose -- with good reason -- is mandatory static typing. The idea that anyone advocates giving up the ability to catch bugs at compile time if it can be done at no cost is a straw man.
- berkes 3y agoWho is arguing for mandatory static typing? Even the article we're discussing points out there are cases for no- or dynamic typing.
- lucasyvas 3y agoI am arguing for it, for one. There isn't a single good reason that it should be optional in a production code base moving forward. If you started with a dynamically typed language, you should be introducing type hinting and enforcement at a CI/CD step as soon as yesterday.
- berkes 3y agoBut you too make exceptions, right here. All I'm pointing out, is that people who oppose strong static typing on the base of "but we don't want it everywhere" are drawing the wrong conclusions, because, indeed, we don't want it everywhere. We (I) do, however, need and want it in far more places than it's used today.
- ReflectedImage 3y agoDynamic typing triples your software development speed and decreases bugs in delivered software by two thirds. You can either hire 10 dynamic typing software developers or 30 static typing software developers. Businesses which choose to hire 30 static typing software developers will fall to the companies which hired 10 dynamic typing software developers. It's pure economics. Static typing fills your codebase with bugs. Whilst an inexperienced software developer might not understand why static typing increases rather than decreases bugs, you can see the increase in bugs in research papers on the topic. As plan as day. (Hint: You have made your code more complex by using static typing and more complex code contains more bugs.)