At least for Python (since I'm more familiar with Python code and the Python ecosystem): progressive typing lets you incrementally add typing to an existing Python codebase. So you can have at least some of the benefits of typing for new or updated code without needing to re-write in a new language.
You get the complexity and slower development times of using statically typed languages along with the bad performance of using dynamically typed languages.
Is this based on your experience or is it just an assumption?
I only have anecdotes, but it does not reflect your claims, rather the exact opposite.
A lot of the boilerplate code doesn’t need to be type annotated, but annotating the main business logic doesn’t take more time and is not more complicated, but instead type annotations help write code that is more clear, more obvious, and it adds some kind of documentation.
It really depends on how you tackle gradual typing on a project level. The easiest way to sabotage is a "any new code must be fukly type checked" requirement, because it often means you also need to add type hints to any code you call, which leads to Optional[Union[Any]] nonsense if you let juniors (or coding assistants) go wild.
As always, no fancy new tech is a substitute for competent project management.
Have you actually used this in a real codebase? Because it is the opposite of my experience in gradually adding types to a large python codebase. There's no extra complexity or slower development. It's not like you need to suddenly move to a different coding paradigm with FactoryBeanFactoryBeans... You just keep writing python like you did, but add types here and there to help clarify things and make your LSP (like ty) work better.
If anything, it speeds up development. Plus it helps give more confidence in the correctness of your code.
Yep, the software development slows down to crawl. Yes, you can still code at the same speed as you were coding in a language like Java or C# but that is considerably slower then what's possible in languages like Ruby and Python.
To give you a roughly idea, you should always expect a 3x slow down when using static typing.
An recent example is Turborepo that went from basic types in Go to proper static typing in Rust. Just adding in the proper typing caused the codebase to grow from 20,000 lines to 80,000 lines and from 3 developer months to 14 developer months.
The stronger your typing system, the slower you will develop code. Whether you realise it or not.
Nonsense. You get the simplification and faster development times of knowing some variable types statically, plus the performance improvements for the compiler which can move the type checks from runtime to compile-time. Plus all the new optimization possibilities.
Common Lisp showed you the way. But almost none looked at it. Only PHP did.
Absolutely not. Duck type based development results in working code out of the door 3x faster than static type based development. It always has since ancient times.
If performance wasn't an issue, then the static type based developers would all be fired. Either directly or by the businesses who relied on them getting driven into bankruptcy by their competitors. You would still get some niche jobs in it where they like to do formal verification of the code.
Your problem is just that your development skills from static type based development don't transfer to duck type based development. Different style of codebases needs to be handed completely differently.
I am talking about gradual typing here. Types are optional, if not given or implied they default to any. No need to annotate anything. If given they are enforced, and lead to optimized op codes and errors if violated. Some at compile-time, some at run-time. If fully typed, all errors are caught at compile-time already.
Duck typing as done with python is the worst of both worlds. No optimizations, no enforcement. Just optional external typechecks.
Of course untyped code (ie runtime types in each var) is to write faster. You only need to add types to some vars or args, and gradually improve from there. Eg ints only, because they are optimized the easiest. No need to check for strings, bigint, floats,....
Or arrays to check for overflows at compile-time and restrict to ints or strings. Massive improvements possible, in size and runtime.
If JITs hadn't been invented you would be completely right but JITs have been invented.
There are deeper optimizations that JITs can do such as knowing at runtime that the value of a variable is always 2 that typing information simply can't express.
Duck typed Python is optimal for development speeds, the only thing that matters in startup environments. It has it's niche.
You aren't gradually improving, you are gradually deteriorating the codebase to make it look more familar to you.
At least CPython and CRuby (MRI), the most common implementations of each language, ignore all type hints and they are not able to use them for anything during compile or runtime. So the performance argument is complete nonsense for at least these two languages.
Both Python and Ruby (the languages themselves) only specify the type hint syntax, but neither specifies anything about checking the actual types. That exercise is left for the implementations of third party type checkers.
The problem is there are a lot of developers who have only coded with static typing and have no idea about the terrible drawbacks of static typing.
They don't understand what static typing does to code verbosity and development times.
Take Turborepo going from Go's typing light system (designed to emulate duck typing) to Rust's heavy typing system (true static typing). Originally the code was 20,000 lines and was coded by 1 developer in 3 months. When moved into the typing style you like so much, the same code is now 80,000 lines and was coded by a team of developers in 14 months.
I ask this out of genuine curiosity and not to try to start an argument: could you help point us towards this research? This point frequently comes up when discussing interviews, but I've never seen references to specific research and I don't know where to even start looking.
I don't know - my HR department tells me our process is research backed, but not how to verify their claim. I doubt they are lying. However I honestly don't know how to search academic literature to find it. I suppose I should ask HR someday, or you could ask your HR rep.
My previous employer was about 1k engineers and elements of the interview process were research-backed, but it was mostly procedural (order of rounds, length of interviews, etc) and based on internal data. But I now work at a startup where we make a best effort based on everyone's previous experiences.
What metric are you looking at when you say "the size of government has vastly and consistently outgrown the private sector" - AFAICT, excluding 2020 and 2021 (which I think is reasonable), the federal budget has been between 17% and 25% of GDP for the past 50 years (where the fluctuations are more a function of variable GDP).
The number of federal government employees has also remained mostly flat for the past 50 years (and IIRC most growth in overall public sector employment comes from schools).
No, it does make sense. Most of the purported growth in government spending is just using raw figures, and not correcting for either inflation or monetary expansion. It is a convenient mistake.
I can't remember where I heard this but it stuck with me: Teslas are the new American muscle car - fast in a straight line, but otherwise poor build quality and lacking the attention to drivers' experience you get from European brands.
As a person who owned multiple Teslas I really don’t understand the “poor build quality” sentiment. What other car at the same price point has better build quality? And if one or two do, does that make the Teslas build quality “poor”?
I had a MINI. That was a build quality disaster. Major engine issues after only three years. I now have a Silverado 1500 LTZ. It has obvious build quality issues. Interior isn’t as good as it used to be. Gearbox has a banging sound. My Teslas seem so much better than either of those or most other cars I interact with really. I sat in my friends Toyota Camry the other day. The interior seemed so much cheaper, the sound quality so much worse, the cabin was so much more loud than my humble Model 3. What about my car has poor build quality that I am oblivious to?
Build quality is less about how the interior seems cheap or not but about tolerances. A Camry can have cheap plastic everywhere, but if the connection points don't rattle, it's a "better" build quality. But the truth of it is that the majority of people don't notice the build quality. A cup holder is a cup holder, even if it slightly rattles or is slightly off center.
The main example is the panel gaps on Tesla body. They can be offset by a "large" amount compared to other car brands, but it doesn't harm anything and you have to look for it to be noticeable.
So do Tesla's have a bad build quality? Yes, if you define it by tolerances, but no if you define it by "Does it feel low quality". And the debate online is largely with people talking past each other with differing definitions of what build quality actually means.
Some examples of build quality issues are the metal sheets that are glued on and coming off during driving. As well as accelerator pedals that get stuck.
The funny thing is that whenever I get into a Tesla, the interior just feels kinda cheap and of low-quality/low-effort design. That's not saying anything about their build quality, though.
It’s one of those things where you can claim Teslas have poor build quality and you get a free pass, but you will be “source?”d to death if you contradict it.
I’ve had several Teslas and even currently have their supposed disaster of a truck and have not encountered this alleged build quality issue. My car before that, a Honda Civic, spent much more time in the shop purely on account that it needed oil changes and expensive scheduled maintenances once or twice a year.
I have two teslas and the build quality is amazing. I never do anything to them other than change the tires. Haven’t even touched the breaks. It’s the ultimate daily driver and I’ll never buy another type of car.
I have a Lexus LX, one of the most expensive Lexus vehicles ever made. I love it. It was made in Japan.
Tesla panel gaps and quality are fine. They had some early issues, but the damn things are basically body panels hung off of almost entirely cast chunks of metal. There is not a lot of room for wiggle. If anything, they're so we'll integrated that they're hard to repair after a crash.
Maybe. But crucially Teslas, and EVs in general, don't look like muscle cars and they're not marketed that way. Yeah they can be insanely fast in a straight line, but the appeal of muscle cars was about a lot more than straight line performance.
I'm not actually sure any EV could capture what people like about muscle cars, but you're definitely not going to get it from some futuristic transport blob that just happens to have a low 0-60 time. The Tesla roadster might have captured some of the sports car magic, but it's telling they don't make that any more (for now). I don't know if they could do the same thing for muscle cars at all.
Many 60s/70s American muscle cars had racing pedigrees. It was a coupe with a V8, one could argue they were replaced by the JDM market with turbo 4s/I6s in the 90s early 2000s.
Maybe more importantly, either of the above had an appealing visual style (to some!) and had their own community around them. Teslas are pretty visually boring, you can't really modify them, but I suppose they have a community of their own who debates which version of software drives the car for you better.
At the time that the muscle car came into existence, there was nothing wrong with the build quality of American cars compared to European cars. It wasn't until the mid-70s that this changed.
Kickback: usually refers to a company (or sales rep) giving a large "gift" to the individual at a company responsible for making a purchase decision (influencing that person to make a decision not in their company's best interest).
The Sopranos was a HBO show about a mob family. Historically, waste management in some cities has been controlled by the mob.
Can you provide more details about said "significant evidence"? This seems to be a pretty popular belief, despite being contrary to generally accepted economics, and I've yet to see good evidence for it.
This (continuing Francis' school of thought) should be rather predictable - Pope Francis appointed the majority of voting cardinals, so it's not a stretch to think this is generally his intended outcome.
It's not as straightforward. Francis was voted by cardinals who were appointed by the much more conservative JPII and Benedict XVI, so it's not that easy to control or direct the outcome of a conclave.
1. If the pope were of median age for a Cardinal when selected, then about half the popes would still be around when he died. I don't have numbers, but my instinct would be that more senior Cardinals are more likely to be selected pope, which would mean a minority would be appointed by the previous pope at the time of the Conclave.
2. It was only in 1970 that an age-cap was put on Cardinals in the conclave, which significantly increases the power of the previous pope has on his successor; this disqualifies 117 out of 251 Cardinals today.
3. There are certain positions that customarily come along with a cardinality; following this custom diluted the pope's power a bit. Francis did not follow this custom[1]
If you want a discussion of the papal selection, you could do worse than this substack post[2] from a week ago.
Yeah republicans claim to want to run the government like a business, but the first thing a business should do when they have a deficit is raise revenue! And especially in the case of the US government, the the only barriers to doing that are self-imposed.
reply