主要编程语言简史
A brief history of primary coding languages

原始链接: https://eclecticlight.co/2025/07/19/a-brief-history-of-primary-coding-languages/

## Mac 开发语言的历史 数十年以来,苹果 macOS 的开发一直经历着主要编程语言的变迁。最初,**Clascal**(1984年)——UCSD Pascal 的演进版本——驱动着早期的 Mac 软件。这很快过渡到 **Object Pascal**(1986年),伴随着 Macintosh Programmer’s Workshop (MPW) 的发布,它成为主导语言,被用于早期版本的 Adobe Photoshop 等软件。 然而,苹果在 1991 年随着 System 7 的发布,戏剧性地转向 **C++**,这给一些开发者带来了冲击。**Objective-C** 随着 Mac OS X 在 2001 年到来,继承了 NeXTSTEP 的根基,并成为多年以来的标准,得到了 Xcode 等工具的支持。 最近,在 2014 年,苹果推出了 **Swift**,旨在取代 Objective-C。Swift 发展迅速,在 2019 年达到稳定版本 5.0,并成为现代 Apple 开发的首选语言。 除了这些主要语言之外,像 Common Lisp 和 APL 这样的语言也在 Mac 上找到了自己的定位,但许多已经停止使用。这种持续的演变反映了苹果不断追求改进开发工具和语言能力的努力。

一篇关于编程语言历史的文章在Hacker News上引发了讨论,显示出人们对Objective-C (ObjC) 怀有强烈的怀旧之情,尽管苹果公司正在推动Swift的使用。 用户认为ObjC仍然是一种强大且实用的语言,理由是它的稳定性、与C语言的兼容性以及通过ARC实现有效的内存管理。他们批评Swift频繁的重新设计和增加的认知负担,使得旧代码示例更难利用。 虽然承认Swift由于苹果的投资而拥有未来,但评论员预测ObjC将在现有代码库中拥有漫长的生命周期。一位用户甚至在使用SDL3开发一个跨平台的Cocoa替代方案,旨在完全避免使用Swift。 这场对话凸显了代际差异,老一代开发者对Swift的复杂性表示沮丧,并对他们掌握了数十年的语言充满喜爱。最终,这个帖子证明了成熟工具的持久吸引力以及采用新技术的挑战。
相关文章

原文

Plenty of great apps have been created using the Mac’s scripting languages, but commercial developers have largely relied on compiled languages used and supported by Apple for app and system development. Over the years those have included Object Pascal, C/C++, Objective-C and most recently Swift. This article provides a brief overview of how those changed.

Lisa Clascal (1984-86)

Following Apple’s use of UCSD Pascal on Apple II computers, when the Lisa was being developed its primary language was Lisa Pascal. Apple was also working on the novel object-oriented language Smalltalk which originated in Xerox’s PARC in 1969, but its syntax was unfamiliar and performance was poor. Lisa Pascal was therefore developed into Clascal, dividing code into distinct interface and implementation sections, with classes, subclasses, methods and inheritance.

During the first couple of years, software for the Mac was thus developed using Clascal on Lisa systems.

Object Pascal (1986-91)

In 1984-85, Larry Tesler and supporting engineers in Apple (including Barry Haynes, Ken Doyle and Larry Rosenstein) worked with Niklaus Wirth, the inventor of Pascal, to develop Clascal into Object Pascal, the primary language for Mac development. With this, they also developed the first version of the MacApp class library that provided a framework to support common application features including the Mac’s GUI.

These were released together in September 1986, in Macintosh Programmer’s Workshop (MPW), which was adopted as the standard development environment for the Mac, both in-house and for third-parties. At that time, the only compiled language supported by MPW was Object Pascal, and it wasn’t until the following summer that the first beta of its C/C++ compiler was released with MPW 2.0. That was developed by Greenhills, but Object Pascal remained the more widely used, particularly in combination with MacApp, also written in Object Pascal. Major developers including Adobe created early versions of their products using Object Pascal and MacApp, perhaps the most famous example being Adobe Photoshop.

At the same time, Think Technologies released the first popular third-party compiler, LightSpeed C, in 1986. This soon became THINK C, gained C++ support, was joined by THINK Pascal, and was bought by Symantec. Borland ported its Turbo Pascal to the Mac, where it adopted the extensions of Object Pascal, and eventually became the cross-platform Delphi in 1995.

C/C++ (1991-2001)

With the release of System 7 in 1991, Apple abruptly switched from Object Pascal to C++, and MacApp 3.0 also changed language. Smaller developers who had extensive source in Object Pascal were far from happy, and in some cases successful products vanished from the market. Others were rescued when Metrowerks released a new integrated development environment for C/C++ as CodeWarrior at the end of 1993 or early 1994. This drew most who had been using THINK C, and MPW also went into decline. The decisive factor was CodeWarrior’s early support for Apple’s new PowerPC Macs. CodeWarrior’s C/C++ saw many Mac developers through that hardware transition until the release of Mac OS X in 2000-01.

Objective-C (2001-)

With Mac OS X came its own primary development language Objective-C, and Apple’s new integrated development environment Project Builder, also derived from NeXTSTEP but written from scratch for the Mac. That was replaced by the first version of Xcode with Mac OS X 10.3 Panther in 2003.

sdksxcode

This screenshot shows Xcode in 2015.

Objective-C had been one of the two object-oriented contenders to succeed C. The other, C++, had already become more widely adopted, and had been favoured by Apple for the previous decade. Although both claim C as their ancestor, there’s little in common between them, and in many respects Objective-C more closely resembles Smalltalk, rejected by Apple when developing the Lisa. Developers whose source code had started in Object Pascal and was then ported to C++, had another major task to convert that to Objective-C.

Originally designed and developed by Brad Cox and Tom Love during the early 1980s, Objective-C’s biggest success had been its selection as the primary development language for NeXTSTEP later that decade. When Apple adopted that as the foundation for Mac OS X, it was inevitable that the language should come with it.

Swift (2014-)

In keeping with its track record, no sooner had Apple entered the 2010s than its engineers, under the lead of Chris Lattner, were working on the successor to Objective-C. Significant early collaborators included Doug Gregor, John McCall, Ted Kremenek and Joe Groff. A first beta-release was provided at WWDC in 2014, and since then Swift has been progressively replacing Objective-C as Apple’s primary development language.

Swift is described as being a multi-paradigm language, and over the course of the last 15 years it has assimilated and adopted almost every available programming paradigm, from classes and objects to protocols and declaratives. Although it’s still possible to write plain code that is understandable by someone with a grounding in C or Pascal, those who prefer to adopt almost any other paradigm can render their code nearly unintelligible to others. Differences between the current version 6.1.2 and version 1.0 from 2014 are huge.

From those early days, Swift has had an interactive mode, based on the ‘read-eval-print loop’ (REPL) popularised by Lisp. This versatility has been developed in Swift Playgrounds, both within Xcode and as a standalone app targeted at those of all ages learning to code for the first time.

swiftscript41

As an introduction to Swift in education, this has been impressive, but it hasn’t proved a gateway for those who didn’t really want to learn how to use Xcode in the first place.

With the release of Swift 5.0 in February-March 2019, the language reached a major milestone of stability in its application binary interface (ABI). Prior to that, executable code built from Swift source had to be delivered with its own copy of Swift’s runtime libraries, amounting to over 11 MB for regular apps. Starting from the release of macOS 10.14.4, and Xcode 10.2, apps written in Swift 5.0 didn’t need those frameworks (except for compatibility when running on older macOS), as their ‘glue’ to macOS has since been delivered in the system. Later that year, module stability was added, to allow sharing of binary frameworks compatible with future versions of Swift.

sample1xcodefullscreen

This screenshot shows the Interface Builder feature in Xcode in 2024.

Others

Although those have been primary development languages, Apple and third-parties have supported many others. Here’s a small personal sample.

In 1984, what was to become Macintosh Common Lisp (MCL) began development. It was released in 1987, initially as Coral Common Lisp (CCL), then Macintosh Allegro Common Lisp, and MCL. It moved on to Digitool in 1994 for PowerPC support, and was made open source in 2007. Unusually for what’s normally considered a specialist language, MCL was well integrated with Mac OS and its GUI.

sdkslispworks

After MCL drifted off into oblivion, LispWorks’ cross-platform implementation of ANSI Common Lisp took over, and remains thoroughly mature and productive, with extensive browsing facilities, debugging, and more.

sdksaplx

An extraordinarily concise and powerful language, APL is also one of the oldest, having been defined in 1962 and first implemented a couple of years later. It uses Greek and special symbols in its own custom font, concatenating them into cryptic lines that make perl look verbose. Its last Mac implementation, MicroAPL’s APLX 5.1, was still able to run in El Capitan, but has sadly been abandoned. However, Dyalog APL remains actively developed, and even supports Apple silicon Macs. Other notable losses include Absoft, whose Fortran compilers were widely used on Macs from 1985, and shut down in 2022.

sdkcvisualstudiocode

Microsoft’s Visual Studio Code, supporting more than thirty programming languages including JavaScript, C#, C++, and Java, was a latecomer to the Mac, and has most recently become VS Code.

References

David Cásseres (1983) Clascal Reference Manual for the LISA, First Draft
Clascal, Wikipedia
Larry Tesler (1985) Object Pascal, Report
Object Pacal, Wikipedia
MPW, Wikipedia
CodeWarrior, Wikipedia
Swift, Wikipedia

联系我们 contact @ memedata.com