Earlier quoted context omitted.
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.
C uses ^ for bitwise xor and a function for exponentiation, though.
The original ABC language, Python's predecessor (1991)
31–40 of 51 posts
Re: The original ABC language, Python's predecessor (1991)
#32Interesting, 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?
Re: The original ABC language, Python's predecessor (1991)
#33The 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) retu…
“HOW TO RETURN” for something as common as “def” is crazy!
DISCOVER HOW TO words WITH document
Re: The original ABC language, Python's predecessor (1991)
#34Earlier quoted context omitted.
“HOW TO RETURN” for something as common as “def” is crazy!
Well, not as bad as something like public static function words(string $document): array { which some languages these days are coming up with.
Re: The original ABC language, Python's predecessor (1991)
#35Earlier quoted context omitted.
Well, not as bad as something like public static function words(string $document): array { which some languages these days are coming up with.
While I agree, at least here every word, though is verbose, at least means something, whereas “HOW TO RETURN” carries no more meaning than “def”.
Re: The original ABC language, Python's predecessor (1991)
#36Re: The original ABC language, Python's predecessor (1991)
#37Earlier quoted context omitted.
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.
C uses ^ for bitwise xor and a function for exponentiation, though.
I should have said "followed Fortran rather than BASIC".
Re: The original ABC language, Python's predecessor (1991)
#38I 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_Sept92 I 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…
Re: The original ABC language, Python's predecessor (1991)
#39Maybe I am remembering this wrong...
Re: The original ABC language, Python's predecessor (1991)
#40Earlier quoted context omitted.
Well, not as bad as something like public static function words(string $document): array { which some languages these days are coming up with.
While I agree, at least here every word, though is verbose, at least means something, whereas “HOW TO RETURN” carries no more meaning than “def”.
I think def is good though. I guess with new fangled prompt engineering you could use the english version.