Need help?
<- Back

Comments (44)

  • mg
    The first example in the lanuage introduction (https://homepages.cwi.nl/~steven/abc/): HOW TO RETURN words document: PUT {} IN collection FOR line IN document: FOR word IN split line: IF word not.in collection: INSERT word IN collection RETURN collection In Python it would be: def words(document): collection = set() for line in document: for word in line.split(): if word not in collection: collection.add(word) return collection I kept the splitting by line and "if word not in collection:" in there even though they don't have an impact on the outcome. I have the feeling that even in the original example they have only been put there to show the language constructs, not to do anything useful. If one wanted to optimize it, it could all be collapsed to just "return set(text.split())", but that would not show off the language features.ABC uses 225 chars, Python 218 chars. 3% less.So one could say Python is 3% more efficient than ABC.
  • kristopolous
    I swear I remember using this. I even remember the syntax. I was able to compile it and just start writing in it. I have no idea how I know this syntax.Did early linux have this? Maybe netbsd?I actually found it. It was on simtel: https://archive.org/details/Simtel20_Sept92I must have gotten it from there. I would routinely get any thing Walnut Creek would make.I also realized a couple years ago I could navigate EDLIN without help and knew how to use masm. Somehow I had forgotten what I know but my fingers did not.
  • dvdkon
    Nice find. This looks like the best introduction to the language in the repo: https://raw.githubusercontent.com/gvanrossum/abc-unix/refs/h...
  • sureglymop
    Wasn't python for a while just a REPL to query and call C functions from shared objects with dlsym and probably an equivalent to libffi?Maybe I am remembering this wrong...
  • zahlman
    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.
  • ahartmetz
    Interesting, seems like Python is a strict improvement over ABC though many things are very similar. The PUT ... IN ... and INSERT ... IN ... syntax looks quite clunky and un-composable, at least the examples never do more than one (high-level) operation per line. Also, I guess GvR's English wasn't that good at the time - it should be have been INTO, right?
  • layer8
    The use of “HOW TO” for defining subroutines is kinda neat. Though “HOW TO RETURN” for functions doesn’t quite hit the mark. “HOW TO OBTAIN” or “HOW TO SUPPLY” would work with the same number of characters.
  • dec0dedab0de
    The year says 91, but it looks like it was recently pushed to github, which is a notable event on its own.
  • nurettin
    It actually looks surprisingly usable https://homepages.cwi.nl/~steven/abc/types.html
  • perrohunter
    Where is the GIL in this?