
為何人工智慧正驅使開發者轉向型別語言
本文探討了人工智慧(AI)的興起,特別是像GitHub Copilot和大型語言模型(LLMs)等工具,如何影響開發者對使用型別程式語言的偏好。文章強調了AI程式碼生成所帶來的優勢,以及它如何提升開發者體驗,同時也觸及了AI在GitHub生態系統和產業中的廣泛應用。
Learn about artificial intelligence and machine learning across the GitHub ecosystem and the wider industry.
Learn how to build with generative AI.
Change how you work with GitHub Copilot.
Everything developers need to know about LLMs.
Machine learning tips, tricks, and best practices.

Explore the capabilities and benefits of AI code generation and how it can improve your developer experience.
Resources for developers to grow in their skills and careers.
Insights and best practices for building apps.
Tips & tricks to grow as a professional developer.
Improve how you use GitHub at work.
Learn how to move into your first professional role.
Stay current on what’s new (or new again).

Learn how to start building, shipping, and maintaining software with GitHub.
Get an inside look at how we’re building the home for all developers.
Discover how we deliver a performant and highly available experience across the GitHub platform.
Explore best practices for building software at scale with a majority remote team.
Get a glimpse at the technology underlying the world’s leading AI-powered developer platform.
Learn how we build security into everything we do across the developer lifecycle.
Find out what goes into making GitHub the home for all developers.

Our engineering and security teams do some incredible work. Let’s take a look at how we use GitHub to be more productive, build collaboratively, and shift security left.
Explore how to write, build, and deploy enterprise software at scale.
Automating your way to faster and more secure ships.
Guides on continuous integration and delivery.
Tips, tools, and tricks to improve developer collaboration.
DevOps resources for enterprise engineering teams.
How to integrate security into the SDLC.
Ensuring your builds stay clean.

Learn why Gartner positioned GitHub as a Leader for the second year in a row.
Keep up with what’s new and notable from inside GitHub.
An inside look at news and product updates from GitHub.
The latest on GitHub’s platform, products, and tools.
Insights into the state of open source on GitHub.
The latest policy and regulatory changes in software.
Data-driven insights around the developer ecosystem.
Older news and updates from GitHub.

Learn how to use retrieval-augmented generation (RAG) to capture more insights.
Everything open source on GitHub.
The latest Git updates.
Spotlighting open source maintainers.
How open source is driving positive change.
Explore open source games on GitHub.

Organizations worldwide are incorporating open source methodologies into the way they build and ship their own software.
Stay up to date on everything security.
Application security, explained.
Demystifying supply chain security.
Updates from the GitHub Security Lab.
Helpful tips on securing web applications.

Learn about core challenges in DevSecOps, and how you can start addressing them with AI and automation.
Categories
Learn about artificial intelligence and machine learning across the GitHub ecosystem and the wider industry.
Learn how to build with generative AI.
Change how you work with GitHub Copilot.
Everything developers need to know about LLMs.
Machine learning tips, tricks, and best practices.
Explore the capabilities and benefits of AI code generation and how it can improve your developer experience.
Resources for developers to grow in their skills and careers.
Insights and best practices for building apps.
Tips & tricks to grow as a professional developer.
Improve how you use GitHub at work.
Learn how to move into your first professional role.
Stay current on what’s new (or new again).
Learn how to start building, shipping, and maintaining software with GitHub.
Get an inside look at how we’re building the home for all developers.
Discover how we deliver a performant and highly available experience across the GitHub platform.
Explore best practices for building software at scale with a majority remote team.
Get a glimpse at the technology underlying the world’s leading AI-powered developer platform.
Learn how we build security into everything we do across the developer lifecycle.
Find out what goes into making GitHub the home for all developers.
Our engineering and security teams do some incredible work. Let’s take a look at how we use GitHub to be more productive, build collaboratively, and shift security left.
Explore how to write, build, and deploy enterprise software at scale.
Automating your way to faster and more secure ships.
Guides on continuous integration and delivery.
Tips, tools, and tricks to improve developer collaboration.
DevOps resources for enterprise engineering teams.
How to integrate security into the SDLC.
Ensuring your builds stay clean.
Learn why Gartner positioned GitHub as a Leader for the second year in a row.
Keep up with what’s new and notable from inside GitHub.
An inside look at news and product updates from GitHub.
The latest on GitHub’s platform, products, and tools.
Insights into the state of open source on GitHub.
The latest policy and regulatory changes in software.
Data-driven insights around the developer ecosystem.
Older news and updates from GitHub.
Learn how to use retrieval-augmented generation (RAG) to capture more insights.
Everything open source on GitHub.
The latest Git updates.
Spotlighting open source maintainers.
How open source is driving positive change.
Explore open source games on GitHub.
Organizations worldwide are incorporating open source methodologies into the way they build and ship their own software.
Stay up to date on everything security.
Application security, explained.
Demystifying supply chain security.
Updates from the GitHub Security Lab.
Helpful tips on securing web applications.
Learn about core challenges in DevSecOps, and how you can start addressing them with AI and automation.
Why AI is pushing developers toward typed languages
AI is settling the “typed vs. untyped” debate by turning type systems into the safety net for code you didn’t write yourself.

It’s a tale as old as time: tabs vs. spaces, dark mode vs. light mode, typed languages vs. untyped languages. It all depends!
But as developers use AI tools, not only are they choosing the more popular (thus more trained into the model) libraries and languages, they are also using tools that reduce risk. When code comes not just from developers, but also from their AI tools, reliability becomes a much bigger part of the equation.
Typed vs. untyped
Dynamic languages like Python and JavaScript make it easy to move quickly when building, and developers who argue for those languages push for the speed and flexibility they provide. But that agility lacks the safety net you get with typed languages.
Untyped code is not gone, and can still be great. I love, personally, that I can just write code and not define every aspect of something on my average side project. But, when you don’t control every line of code, subtle errors can pass, unchecked. That’s when the types-driven safety net concept becomes a lot more appealing, and even necessary. AI just increases the volume of “code you didn’t personally write,” which raises the stakes.
Type systems fill a unique role of surfacing ambiguous logic and mismatches of expected inputs and outputs. They ensure that code from any source can conform to project standards. They’ve basically become a shared contract between developers, frameworks, and AI tools that are generating more and more scaffolding and boilerplate for developers.
With AI tools and agents producing larger volumes of code and features than ever, it only makes sense that reliability is more critical. And… that is where typed languages win the debate. Not because untyped languages are “bad,” but because types catch the exact class of surprises that AI-generated code can sometimes introduce.
Is type safety that big of a deal?
Yes!
Next question.
But actually though, a 2025 academic study found that a whopping 94% of LLM-generated compilation errors were type-check failures. Imagine how much your projects would improve if 94% of your failures went away! Your life would be better. Your skin would clear. You’d get taller. Or at least you’d have fewer “why does this return a string now?” debugging sessions.
What Octoverse 2025 says about the rise of typed languages
Octoverse 2025 confirmed it: TypeScript is now the most used language on GitHub, overtaking both Python and JavaScript as of August 2025. TypeScript grew by over 1 million contributors in 2025 (+66% YoY, Aug ‘25 vs. Aug ‘24) with an estimated 2.6 million developers total. This was driven, in part, by frameworks that scaffold projects in TypeScript by default (like Astro, Next.js, and Angular). But the report also found correlative evidence that TypeScript’s rise got a boost from AI-assisted development.
That means AI is influencing not only how fast code is written, but which languages and tools developers use. And typed ecosystems are benefiting too, because they help AI slot new code into existing projects without breaking assumptions.
It’s not just TypeScript. Other typed languages are growing fast, too!
Luau, Roblox’s scripting language, saw >194% YoY growth as a gradually typed language. Typst, often compared to LaTeX, but with functional design and strong typing, saw >108% YoY growth. Even older languages like Java, C++, and C# saw more growth than ever in this year’s report.
That means gradual typing, optional typing, and strong typing are all seeing momentum—and each offers different levels of guardrails depending on what you’re building and how much you want AI to automate.
Where do we go from here?
Type systems don’t replace dynamic languages. But, they have become a common safety feature for developers working with and alongside AI coding tools for a reason. As we see AI-assisted development and agent development increase in popularity, we can expect type systems to become even more central to how we build and ship reliable software.
Static types help ensure that code is more trustworthy and more maintainable. They give developers a shared, predictable structure. That reduction in surprises means you can be in the flow (pun intended!) more.
Looking to stay one step ahead? Read the latest Octoverse report and try Copilot CLI.
Written by
Cassidy Williams
@cassidoo
Cassidy is senior director for developer advocacy here at GitHub. She enjoys building software, advising startups, and teaching developers how to build better. She has a weekly newsletter at cassidoo.co/newsletter where you can get her updates, practice coding problems, and a joke in your inbox!
Table of Contents
Related posts

Agentic AI, MCP, and spec-driven development: Top blog posts of 2025
Explore the GitHub Blog’s top posts covering the biggest software development topics of the year.

WRAP up your backlog with GitHub Copilot coding agent
An easy-to-remember acronym, WRAP will help you write effective issues, refine your instructions, and get the most out of Copilot coding agent.

Speed is nothing without control: How to keep quality high in the AI era
AI can help you build faster than ever, but it can also produce bugs, issues, and problems. Use these strategies to keep your speed without losing control of your code.
Explore more from GitHub
Docs
Everything you need to master GitHub, all in one place.
GitHub
Build what’s next on GitHub, the place for anyone from anywhere to build anything.
Customer stories
Meet the companies and engineering teams that build with GitHub.
The GitHub Podcast
Catch up on the GitHub podcast, a show dedicated to the topics, trends, stories and culture in and around the open source developer community on GitHub.
We do newsletters, too
Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.
Site-wide Links
Product
Platform
Support
Company
相關文章