Skip to content(if available)orjump to list(if available)

PortablE

PortablE

6 comments

·June 29, 2025

postexitus

I remember using Amiga E, from a cover disk of CU Amiga.

Do I remember correctly that Amiga E had a "but" operator, which executes one statement but returns the value of the other? Never understood its point.

I thought it was one of those things that put Amiga ahead of competitors (because other systems had C/D). Oh my teenager brain.

Edit: looks like I remember correctly!: https://cshandley.co.uk/JasonHulance/beginner_93.html

tialaramex

That's some real esolang brain damage. Did somebody see the (four!) needlessly confusing increment and decrement operators in C and think this hadn't gone far enough?

It's not quite COME FROM but it sure is close for a supposedly useful language.

amiga386

It's only doing what the https://en.wikipedia.org/wiki/Comma_operator does in C

Why you'd use it? Probably for reducing statements to expressions, e.g.

   PROC lower_delta(a1,a2,b1,b2) IS (da:=a2-a1) BUT (db:=b2-b1) BUT (IF da<db THEN da ELSE db)

tialaramex

That's just "I wish this was an expression language". Yeah, good idea, why isn't it?

    type Num = i32; // Or whatever your preferred numeric type is
    fn lower_delta(a1: Num, a2: Num, b1: Num, b2: Num) -> Num {
      let da = a2 - a1;
      let db = b2 - b1;
      if da < db { da } else { db }
    }