Live data from Hacker News

The original ABC language, Python's predecessor (1991)

github.com

11–20 of 51 posts

Re: The original ABC language, Python's predecessor (1991)

#11
post #9

Earlier quoted context omitted.

Wow 2 * 1000 without rounding errors, 40 years ago this must have been super impressive, since I find that quite a feat of today's python.

2 * 1000 is 2000 ;) I think you meant 2**1000 the syntax for formatting ate your star https://news.ycombinator.com/formatdoc

For anyone else who, like me a moment ago, doesn't know the meaning of ** but is curious: it's how many (but not all) programming languages express "to the power of", aka 2**1000 = 2^1000

Re: The original ABC language, Python's predecessor (1991)

#12
post #9

Earlier quoted context omitted.

Wow 2 * 1000 without rounding errors, 40 years ago this must have been super impressive, since I find that quite a feat of today's python.

2 * 1000 is 2000 ;) I think you meant 2**1000 the syntax for formatting ate your star https://news.ycombinator.com/formatdoc

Wow, I didn't know that you could write

  like
    this
      for
        code
          blocks

Re: The original ABC language, Python's predecessor (1991)

#14
post #9

Earlier quoted context omitted.

2 * 1000 is 2000 ;) I think you meant 2**1000 the syntax for formatting ate your star https://news.ycombinator.com/formatdoc

Wow, I didn't know that you could write like this for code blocks

It’s been around since at least occam, maybe longer

Re: The original ABC language, Python's predecessor (1991)

#15
post #11
post #9

Earlier quoted context omitted.

2 * 1000 is 2000 ;) I think you meant 2**1000 the syntax for formatting ate your star https://news.ycombinator.com/formatdoc

For anyone else who, like me a moment ago, doesn't know the meaning of ** but is curious: it's how many (but not all) programming languages express "to the power of", aka 2**1000 = 2^1000

> 2**1000 = 2^1000

The reason for using `**` is that `^` is widely used for bitwise exclusive-or. So commonly `2**1000 != 2^1000`!

Re: The original ABC language, Python's predecessor (1991)

#16
post #5

Extremely cool. Thanks, GvR. For my own language design I've wanted to introduce some of this ABC syntax back into Python. Mainly for unpacking data and doing index/slice assignments; a lot of beginners seem to get tripped up because assignments in Python use the same syntax as mutations, so maybe it's better to write e.g. `a['b'] = c` like `set b = c in a`, or `update a with {'b': c}`, or ... who knows, exactly.

I agree that Python would benefit from separating mutation and assignment.

Especially when you are dealing with nested functions. You'd get around the whole need for 'global' and 'nonlocal' declarations. (Though your linter might still ask you for them for clarity.)

As a minimal syntax change, I would propose using perhaps = for introduction of a variable (the common case) and := for an explicit mutation of an existing variable.

But you could also use `let . = ..` and `. = ..` like Rust does.

Re: The original ABC language, Python's predecessor (1991)

#19
post #2

Nice find. This looks like the best introduction to the language in the repo: https://raw.githubusercontent.com/gvanrossum/abc-unix/refs/h...

Wow 2 * 1000 without rounding errors, 40 years ago this must have been super impressive, since I find that quite a feat of today's python.

Lisp has had arbitrary precision arithmetic since the early 1970s. So did dc on Unix, also in the early 1970s. ABC didn't arrive until 1987.

Re: The original ABC language, Python's predecessor (1991)

#20
post #15
post #11

Earlier quoted context omitted.

For anyone else who, like me a moment ago, doesn't know the meaning of ** but is curious: it's how many (but not all) programming languages express "to the power of", aka 2**1000 = 2^1000

> 2**1000 = 2^1000 The reason for using `**` is that `^` is widely used for bitwise exclusive-or. So commonly `2**1000 != 2^1000`!

I think Fortran used ** because EBCDIC didn't have ^ or uparrow. ABC and Python followed Fortran rather than C on this point. units(1) supports both.
Post reply on HN