Essential insights from Hacker News discussions

Action was the best 8-bit programming language

Here's a summary of the themes discussed on Hacker News regarding the Action! programming language:

Action!'s Relationship to Other Languages

The discussion frequently compares Action! to other prominent languages, particularly JavaScript, ActionScript, Pascal, and Algol. A key point of contention or exploration is whether Action! shares any lineage with these languages.

  • "ActionScript came ~10-15 years later. I would be very surprised if there was any relation." - hn_acc1
  • "ActionScript is based on ECMA/JavaScript" - cosmotic
  • "Originally it was based on HyperTalk, then it switched to ECMA later on." - fourthark
  • "not historically, but merged back into implementing ECMA/Javascript later. it predates javascript by years in earlier revisions." - jjtheblunt
  • "This comes straight from Algol if I'm not mistaken. It seems weird to us now (tho bourne shell / bash kinda has this in spots) but it was in the 60s/70s. When I've looked at it in the past I definitely got the sense that Action was very much inspired by Algol-68, but with some accomodations for the niche of 6502." - cmrdporcupine
  • "That was from Algol 68. Algol 60 used BEGIN/END blocks when the body of a do loop (or a then or else block, etc.) had more than one statement. Bash was influenced by Algol 68." - rootbear

Suitability for 8-bit CPUs and the 6502 Architecture

A central theme revolves around the original article's assertion that 8-bit CPUs, specifically the 6502, struggled with languages like Pascal, and how Action! was designed to overcome these limitations. Participants debate the technical reasons behind these challenges and how Action! addressed them.

  • "The OP says that 8-bit CPUs couldn't handle Pascal well, and that Action! (release in 1983) was the first IDE for 8-bit machines." - wduquette
  • "But Apple Pascal was released for the Apple II in 1979. Based on UCSD Pascal, the Apple Pascal system was basically an OS that simply was an IDE; and it worked perfectly well on 8-bit hardware." - wduquette
  • "I learnt Pascal on a Beeb. It had a compiler, an editor, and a runtime in two 16KB ROMS." - forinti
  • "If I'm not mistaken Apple Pascal ran a virtual machine which executed "p-Code" and the compiler emitted that. Because, yeah, the 6502 is a difficult target for high level languages." - cmrdporcupine
  • "Apple Pascal was a UCSD Pascal descendant, which means it was a P-Code interpreter. The article is broadly correct. The 6502 had what amounts to a mixed-performance address space. All indirect addressing had to be done via pairs of registers in the zero page at addresses 0-255. Essentially all the "pointers" in your application wanted naturally to live as one of these 128 "pointer registers". But that's not the way natural code generation wants to work, where the pointers get stored in the data memory along with everything else. So compiled languages need to have some kind of trampoline for every pointer to copy it into the memory where it needed to live, which was a really tall order for the optimizers of 1983. Or they could just cheat and compile to a virtualized instruction set and feed that to an interpreter. Apple chose this, twice: once with Woz's sweet16 in which Integer BASIC was written, and again with the port of the P-Code interpreter for Pascal." - ajross
  • "Around 1979 or 1980 I was working for an 8080-based CRT terminal manufacturer and ported UCSD Pascal to our 8080 system, which worked flawlessly." - sema4hacker
  • "The OP says that 8-bit CPUs couldn't handle Pascal well The 6502 might not have been able to handle Pascal well, but Borland Turbo Pascal for CP/M (z80, 8080, etc) worked very, very well." - kjs3
  • "6502 is a terrible target for C (and even Pascal) compilation, I have often wondered if it made sense for someone to try and revive Action for the 21st century as a general purpose 6502 high level PL." - cmrdporcupine
  • "One limitation not mentioned is that Action! didn't support recursion. This had to do with how local variables were stored. Whether it was the best language for 8-bit programming, it certainly was a great fit for the 6502, as the language targeted the peculiarities of that chip. Accessing hardware-specific features of the 8-bit Atari's was a snap, which was necessary in order to do anything more interesting than sieves or print loops." - SeenNotHeard

The Importance of Tooling and Compilation Speed

Several commenters highlight that Action!'s success on 8-bit systems was not solely due to the language's elegance, but significantly due to its integrated development environment and remarkably fast compilation times, which were a stark contrast to contemporary alternatives.

  • "I think it hinges on: The Action! language may not have been as advanced as C or Pascal, but because it was designed with the 6502 CPU in mind, compiling the language was astonishingly fast. The original Atari Pascal system from APX needed multiple disk drives and could take several minutes to compile a small program. The only C package available in 1983 (Deep Blue C) was at least as limited as Action!, but also not an integrated package and compiled slowly. Draper Pascal only compiled to pseudo-code. Action! compiled your program to machine code in memory and in seconds. Typing C (to compile) and then R (to run) was hardly slower than just typing RUN in BASIC." - wk_end
  • "Micro-SPL was cut down from the HP SPL systems programming language to run on the Xerox Alto, in microcode, and was ported pretty directly to the 6502 as Action! The Action! folks were pretty coy about this back in the eighties." - buescher

Language Design Choices and Syntax (Algol Influence)

The syntax of Action!, particularly its use of reversed keywords for block termination (e.g., FI for IF) and its overall structure, is discussed. This is noted as an influence from older languages like Algol.

  • "This comes straight from Algol if I'm not mistaken. It seems weird to us now (tho bourne shell / bash kinda has this in spots) but it was in the air in the 60s/70s." - cmrdporcupine
  • "I like it because I definitely spend brain cycles trying to figure out what is being closed! It’s like HTML hah." - hmmokidk

Limitations and Criticisms of Action!

While praised for its speed and 6502 compatibility, Action! also faced criticism for certain limitations and business practices.

  • "One limitation not mentioned is that Action! didn't support recursion. This had to do with how local variables were stored." - SeenNotHeard
  • "Two bad things about Action!: Charging a license fee to distribute the runtime, and that dumb bang in the name." - SeenNotHeard

Alternative "Better than BASIC" Languages

The discussion broadens to include other languages that offered improvements over BASIC on 8-bit systems, positioning Action! within a broader context of the era's software development landscape.

  • "Another 8-bit "better than BASIC" language was COMAL. Similar to the language in the article, it also had structured programming constructs, and the C64 version had built-in turtle graphics, sprite, and sound commands. I remember picking a version up at a mall kiosk that sold PD disks and it expanded my horizons!" - jasperry

The "Best" Language Debate and Velocity

Commenters questioned the article's claim of Action! being the "best" and suggested that its strength might lie more in its fast, procedural approach, which can create a sense of "velocity" in development, drawing parallels to modern languages like Go.

  • "This article doesn't really prove why it's the best. I feel like if it's the best it would have been ported to more systems." - charcircuit
  • "I have this theory that Go tickles people because like Basic or something like Action it has all of these sort of abstraction ceilings that lead to "straight down the middle" procedural code. Definitely leads to a feeling of velocity. I don't like the language that much but I do get the fun from that feeling!" - rtpg

Historical Context and Creator Information

A specific interview with Action!'s creator is shared, adding a layer of historical detail and insight into the language's origins.

  • "An excellent interview with the creator of Action! - Clinton Parker." - Zeetah