JavaScript

Search documents
谁是2025年度最好的编程语言?
量子位· 2025-10-01 01:12
Jay 发自 凹非寺 量子位 | 公众号 QbitAI Python依然是最好的语言。 在刚刚出炉的IEEE Spectrum 2025编程语言排行榜上,Python再次斩获最受欢迎的编程语言。 不仅是冠军,而且是「一骑绝尘」的断崖式领先—— 第二名Java和Python的差距相当悬殊。 更可怕的是,Python仍保持着迅猛的增长速度,一、二名之间的鸿沟还在越拉越大。 Python十连冠 继连续九届蝉联IEEE Spectrum榜首后,Python今年再次发力,拿下了编程语言综合排名榜十连冠。 而且, 这是Python首次在综合排名、增长速度、就业导向等三个板块都问鼎第一,也是IEEE榜单12年来第一个三冠王。 想当年,Python刚出道时就因简洁性闻名遐迩,因此逐渐替代Java成为了高校的教学语言。 随后,NumPy、SciPy、matplotlib、pandas等库相继问世,让Python迅速成长为科研、金融、数据分析领域的王牌。 在这一过程中, 网络效应发挥了巨大作用。 越来越多的程序员选择Python,并基于它开发了各类工具,在开源社区贡献了海量的代码和解决方案,逐渐构建出属于Python的生态护城 ...
小众语言再难出头!写代码靠和 AI 聊天、连用啥都不在乎了,开发者感叹:等我们不在了,AI 智能体会接手
AI前线· 2025-09-29 07:05
Core Viewpoint - The article discusses the evolving landscape of programming languages, highlighting the dominance of Python and the decline of JavaScript, while emphasizing the impact of AI on programming practices and the potential stagnation of new language development [2][4][19]. Programming Language Rankings - IEEE Spectrum's 2025 ranking includes 64 programming languages, evaluated based on usage by programmers, employer demand, and current trends, with Python retaining the top position [2][4]. - JavaScript dropped from third to sixth place, attributed to the rise of AI tools that reduce the need for traditional coding practices [4][10]. Metrics and Methodology - The ranking process utilized seven different metrics, including Google search traffic, Stack Exchange questions, research paper mentions, and GitHub activity, reflecting the attention garnered by various languages [3][4]. AI's Influence on Programming - The article notes a significant reduction in questions posted on Stack Exchange, with 2025's volume at only 22% of 2024's, indicating a shift towards AI-assisted coding [12][13]. - Developers are increasingly relying on AI models like Claude and ChatGPT for coding assistance, leading to a diminished focus on specific programming languages [12][13]. Future of Programming Languages - The article raises concerns about the potential decline in the emergence of new programming languages, as AI tools may address many coding challenges, reducing the need for new languages [15][19]. - It speculates that programming may evolve towards a model where AI generates code from high-level prompts, potentially rendering traditional programming languages less relevant [18][19].
为什么 setTimeout(0) 不是真的 0 毫秒?浏览器藏了这些“小心思”
程序员的那些事· 2025-09-14 11:04
Core Viewpoint - The article discusses the behavior of JavaScript's `setTimeout` function, highlighting that it does not execute with a true delay of 0 milliseconds, but rather has a minimum delay of approximately 4 milliseconds due to browser limitations aimed at preventing abuse and ensuring user experience [6][8]. Group 1: Timer Behavior and Limitations - Browsers impose a minimum delay of 4 milliseconds for `setTimeout` to prevent excessive battery drain and maintain page interactivity [8]. - Different browsers have varying restrictions, with older versions of Edge increasing the delay to 16 milliseconds on battery-powered devices, and Chrome imposing a 1-second delay on background tabs [8]. - A benchmark test showed that `setTimeout` in Chrome took 4.2 milliseconds, while alternatives like `MessageChannel` and `scheduler.postTask` performed significantly better [10][11]. Group 2: Alternatives to setTimeout - The article evaluates alternatives to `setTimeout`, including `setImmediate`, `MessageChannel.postMessage`, `window.postMessage`, and `scheduler.postTask`, with the latter being recommended for its ease of use and performance [9][11]. - The benchmark results indicated that `scheduler.postTask` and `MessageChannel.postMessage` had comparable performance, while `setTimeout` was consistently slower across different browsers [10][11]. Group 3: Developer Responsibility and Browser Design - There is a debate within the industry regarding whether developers should be held accountable for their code or if browsers should impose restrictions to prevent misuse of APIs like `setTimeout` [12]. - The article suggests that providing developers with better tools for task scheduling could reduce reliance on `setTimeout` and the need for browser interventions [12][13]. - The existence of the Scheduler API indicates a shift towards empowering developers while aligning with browser rendering processes [13].
GPT-5:前端开发者的“选择自己的冒险路线”
3 6 Ke· 2025-09-05 10:33
Core Insights - OpenAI claims that GPT-5 excels in front-end coding, outperforming its predecessor in 70% of internal tests [2] - Mixed reviews from developers indicate that the initial excitement around GPT-5 may be overstated, with some users reporting a decline in performance [3][4] - A poll conducted by AI engineer Shawn Wang revealed that over 40% of respondents rated GPT-5 as "average" or "poor" [4] Developer Experiences - Influential developer Theo Browne initially praised GPT-5 but later expressed disappointment, stating that its performance had worsened over time [3] - A GitHub Copilot user criticized GPT-5 for its weak summarization and explanation capabilities, comparing it unfavorably to Claude Sonnet 4 [3] - Developers are exploring the potential of GPT-5 to create applications without traditional frameworks like React, suggesting a shift in front-end development practices [7][8] Performance Comparisons - The ability of GPT-5 to create websites without frameworks has impressed some developers, raising questions about the necessity of tools like React [8] - Differences in performance between various versions of GPT-5 have been noted, with some users experiencing less impressive results with non-premium versions [10] - A study by Sonar highlighted the varying coding styles and effectiveness of different AI models, indicating that GPT-5's coding personality is still being evaluated [11]
逆向还原代码,这是大模型最好的用处了吧~
菜鸟教程· 2025-09-05 03:30
Core Viewpoint - The article discusses the open-source tool Humanify, which helps convert obfuscated JavaScript code into a more readable format using advanced language models and Babel's AST renaming capabilities [3][4]. Group 1: Tool Overview - Humanify is an open-source JavaScript tool developed on Node.js, licensed under MIT [3]. - It combines intelligent naming suggestions from large language models (LLMs) with Babel's AST renaming tool to enhance code readability and maintain logical consistency [3][4]. Group 2: Installation and Usage - Installation can be done globally using npm with the command `npm install -g humanifyjs`, or it can be run temporarily using `npx humanifyjs` without installation [6]. - The tool supports three running modes: openai, gemini, and local [7]. Group 3: Command Line Parameters - For the OpenAI mode, the command is `humanify openai --apiKey="your-token" obfuscated-file.js`, with an option to set the API key as an environment variable [8][9]. - The Gemini mode follows a similar command structure, allowing for cloud-based processing with optimized hardware [10]. Group 4: Model and Performance - The local mode runs on a pre-trained model downloaded separately, ensuring syntax remains unchanged during renaming [11][12]. - The tool is designed to be user-friendly for JavaScript developers, eliminating the need for Python dependencies [11]. Group 5: Hardware Compatibility - Humanify has native support for Apple M series chips, allowing it to leverage the GPU performance of Mac devices [15]. Group 6: Example Usage - An example is provided where a compressed function is transformed into a more human-readable version using the Humanify tool, demonstrating its effectiveness [16].
2025 年 08 月编程语言排行榜|Python 在 AI 编程助手加持下,一路狂飙!
菜鸟教程· 2025-08-11 00:29
Core Viewpoint - The TIOBE Index for August 2025 highlights that AI programming assistants have significantly boosted Python's popularity, achieving its highest ranking ever in the index [1][3]. Group 1: Python's Dominance - Python has reached a historical peak in the TIOBE Index, with a rating of 26.14%, far ahead of its competitors [18][23]. - The gap between Python and the second-ranked C++ is nearly 17%, indicating a substantial lead [17]. - The rise of AI tools like Microsoft Copilot and Google Gemini Code Assist has improved coding efficiency by approximately 20% when using popular programming languages [5][9]. Group 2: Competitors and Trends - The top six programming languages in the TIOBE Index are dominated by Python, C++, C, Java, C, and JavaScript, showcasing a "stronger gets stronger" phenomenon [9][22]. - Other languages such as Go, Perl, Delphi, and Fortran are engaged in a competitive struggle for rankings, with Perl making significant progress this year [10][23]. - Legacy languages like Visual Basic, SQL, and Ada continue to maintain relevance in specific domains, despite their declining popularity [14][13]. Group 3: Historical Context and Future Outlook - Python's historical ranking has improved significantly over the years, moving from 7th place in 2015 to 1st in 2025 [29]. - The article speculates on the potential for Python to dominate the programming landscape further if it overcomes its performance limitations [20][19]. - The TIOBE Index serves as a reflection of current trends in programming languages, influenced by the number of engineers, courses, and third-party vendors [30][31].
2025 年 07 月编程语言排行榜|主流编程语言内卷升级,安全系“黑马” Ada 正在逆袭?
菜鸟教程· 2025-07-11 02:31
Core Insights - The TIOBE Index for July 2025 reveals that Python, C, C++, Java, C, JavaScript, and Go have maintained their positions in the top seven programming languages for three consecutive years, forming a strong "first camp" [1][4] - The competition for the 8th to 12th positions is fierce among older languages like Visual Basic, SQL, Fortran, Ada, Perl, and Delphi, showcasing a "twilight of the gods" in the programming world [1][3] - Despite the emergence of newer languages like Rust, Kotlin, Dart, and Julia, they have not yet broken into the top ten due to the resilience of established languages [4][5] Rankings and Market Share - Python's market share has surged to 26.98%, significantly widening the gap with the second-ranked C++ at 9.80%, marking a dramatic lead [7][10] - The top ten programming languages in July 2025 are: Python, C++, C, Java, C, JavaScript, Go, Visual Basic, Ada, and Delphi/Object Pascal [14][16] Language Characteristics and Trends - Python is recognized for its ease of use and active community, despite criticisms regarding its performance speed [11][12] - Older languages like Visual Basic and SQL maintain relevance due to their roles in enterprise legacy systems and database foundations, respectively [5][4] - Ada is experiencing a resurgence in high-security applications, while Fortran remains entrenched in scientific computing [5][4] Historical Context - The TIOBE Index is updated monthly and reflects trends in programming languages based on the number of engineers, courses, and third-party vendors, providing insights into the current landscape of programming languages [20]
2 万程序员签名!Node.js 之父炮轰 Oracle,这事对行业有重大影响。网友直呼:它就是寄生虫
程序员的那些事· 2025-06-29 11:31
Core Viewpoint - The ongoing legal battle between Ryan Dahl, the creator of Node.js, and Oracle over the JavaScript trademark centers on the claims of generic use and abandonment of the trademark by Oracle, which has not actively used it in product development for years [5][28]. Group 1: Latest Developments - On June 18, the Trademark Trial and Appeal Board (TTAB) dismissed the fraud claims against Oracle, which alleged that Oracle misled the USPTO by using Node.js website screenshots to prove the use of the JavaScript trademark [3][4]. - The focus of the case is now on the more critical claims of genericity and abandonment, with a deadline for Oracle to respond to the trademark cancellation application set for August 7 [5][7]. - As of the writing, over 20,455 individuals have supported the stance that JavaScript is not Oracle's product, highlighting the public interest in the case [8]. Group 2: Background of the Trademark Dispute - The trademark dispute traces back to 1995 when Sun Microsystems registered the JavaScript trademark during its collaboration with Netscape [14]. - Oracle acquired the trademark in 2009 through its purchase of Sun but has not utilized it in any significant product development, leading to claims of abandonment [15][18]. - In November 2024, Deno Land, founded by Ryan Dahl, filed a petition with the USPTO to revoke Oracle's ownership of the JavaScript trademark, citing generic use and lack of actual use over the past 15 years [12][22]. Group 3: Industry Impact and Underlying Issues - The trademark restrictions have led to confusion in the industry, with developers often using ECMAScript as the official name instead of JavaScript, which has hindered community events and led to legal threats from Oracle [25]. - Oracle's insistence on retaining the trademark is viewed as a legal deterrent, reflecting its historical approach to trademark enforcement, as seen in its lengthy litigation against Google over the Java trademark [26]. - The case represents a broader struggle between the open-source community and corporate control over technology, with Dahl asserting that JavaScript should be considered a public good rather than a corporate asset [27][29].
2025 年 06 月编程语言排行榜|SQL 的未来在哪?SQL 算不算编程语言?
菜鸟教程· 2025-06-11 01:41
Core Viewpoint - The TIOBE programming language ranking for June 2025 indicates a decline in SQL's popularity, dropping to 12th place, marking its historical low, while Python continues to dominate the rankings with a significant lead over other languages [2][20]. SQL's Historical Context - SQL reached its peak ranking at 6th place in October 2003 but was removed from the TIOBE index from 2004 to 2018 due to debates about its classification as a programming language [5]. - SQL was reintroduced to the rankings in 2018, benefiting from its stronghold in the database domain, and returned to the top ten [5]. SQL's Applications - SQL is integral to various sectors, including banking, e-commerce, healthcare, and education, where it manages vast amounts of structured data [7]. SQL Database Overview - A list of common SQL databases includes MySQL, PostgreSQL, SQLite, MariaDB, Oracle, SQL Server, and IBM Db2, with most being open-source [9]. Rise of NoSQL - The emergence of NoSQL databases poses a significant threat to SQL, as NoSQL is designed to handle unstructured data and offers greater flexibility, making it suitable for rapidly changing requirements [10][12]. - NoSQL databases, such as MongoDB and Redis, are increasingly favored for their ability to manage big data and high concurrency scenarios [13][16]. Programming Language Rankings - As of June 2025, the top programming languages are Python, C++, C, Java, C, JavaScript, Go, Visual Basic, Delphi/Object Pascal, and Fortran, with Python holding a commanding lead at 25.87% [20][22]. - SQL's ranking has dropped significantly, now positioned at 12th place, reflecting a shift in developer preferences towards more flexible programming languages [26]. Historical Trends - The TIOBE index tracks the popularity of programming languages based on various metrics, including search engine queries and community engagement, providing insights into industry trends [29].
零JS,他用4.6万行HTML+CSS手搓了个《我的世界》,程序员哭诉:网友把服务器玩爆了
3 6 Ke· 2025-05-28 12:14
Core Concept - A developer named Benjamin Aster created a clone of Minecraft using only HTML and CSS, without any JavaScript, showcasing the potential of these technologies in building interactive web applications [1][3][17]. Project Overview - The project consists of 480 lines of CSS and 46,022 lines of HTML, resulting in a 3D world where users can add and remove blocks and rotate the view [3][4][17]. - The game allows interaction within a 9x9x9 grid, featuring 7 different types of blocks [3][6]. Technical Implementation - The project utilizes 35,001 `<label>` tags and 5,840 `<input type="radio">` buttons to manage the state of the blocks, with each block having six sides represented by labels [6][7]. - The `:has()` selector in CSS is a key technique that enables the interaction logic, allowing for dynamic visibility of block types based on user selection [6][13]. - To generate the extensive HTML structure, Aster employed Pug, a templating language, which simplifies the creation of nested elements [6][7]. Animation and Interaction - CSS animations are used to control the 3D view and rotation, with specific rules defined for button interactions that trigger animations [9][12]. - The design allows for a seamless user experience, where pressing and holding buttons initiates animations that manipulate 3D transformation properties [12]. Community Response - The project gained significant attention on Hacker News, with users expressing admiration for the innovative use of CSS and the creativity behind the implementation [13][14]. - Aster noted that the project was originally an experimental work from three years ago, aimed at exploring the limits of pure CSS [14][17]. Access and Experience - Users can experience the project through a dedicated website, which has seen increased traffic, leading Aster to switch hosting services to accommodate the demand [14][15]. - For optimal performance, it is recommended to access the project using desktop browsers, particularly those based on Chromium or Firefox [15].