Live data from Hacker News

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

github.com

31–40 of 51 posts

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

#31
post #21
post #20

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.

He's explaining that C was not the reason for picking * over ^

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

#32

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?

not a strict improvement: didn't ABC have persistent variables?

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

#33
post #26
post #24

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) retu…

“HOW TO RETURN” for something as common as “def” is crazy!

Reminds me if tabloid language, were the translation would be :

DISCOVER HOW TO words WITH document

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

#34
post #27
post #26

Earlier 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.

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)

#35
post #34
post #27

Earlier 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”.

As I understand it, "RETURN" means that the function will return something. And that when you define a function that returns nothing, but only does something, you just use "HOW TO".

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

#36
post #26

Earlier quoted context omitted.

“HOW TO RETURN” for something as common as “def” is crazy!

Reminds me if tabloid language, were the translation would be : DISCOVER HOW TO words WITH document

    DISCOVER THE SHOCKING TRUTH ABOUT HOW TO hello WITH name:
        PRINT "hello " + name

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

#37
post #21
post #20

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.

No, C does not have an exponentiation operator! Possibly you meant "and not a function for exponentiation".

I should have said "followed Fortran rather than BASIC".

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

#38

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_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…

I encountered it on an open day on the university. The only thing I still remember is that functions were called HowTo, because they described how to do something.

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

#40
post #34
post #27

Earlier 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 guess it's a shortening of "here's how to return the words in a document".

I think def is good though. I guess with new fangled prompt engineering you could use the english version.

Post reply on HN