News for hackers. Stuff that matters.
Re:Programming for Cats by derefr on Saturday February 06, 2021 @12:01PM (#26047818)
To answer seriously: it might not be most people's favorite language, but it's probably one that the most practicing programmers today and people who ever took a programming language in school any time in the last 30 years, can read; and therefore it's probably the best choice as the basis for a humor book.

Java has so little syntax—and yet what little syntax it has is C-ish—that it's mutually intelligible to everybody from programmers who only know C, to programmers who only know Haskell. (Maybe not to programmers who only ever learned 6502 assembler, but they have their own humor books published 40 years ago.)

(Is there a term for this in linguistics? A measure of the eigenvector of mutual intelligibility a language has to all other spoken/written languages?)

Re:Programming for Cats by smlckz on Saturday February 06, 2021 @12:26PM (#26048084)
i don't know, but, why not, say, BASIC? (most programmers being able to understand) or, Smalltalk, (little syntax, that ''fits inside a postcard'') or a lisp?
Re:Programming for Cats by pmontra on Saturday February 06, 2021 @12:47PM (#26048271)
BASIC was commonly understood in the 80s despite lots of very different dialects and also in the 90s mostly because of Visual Basic. Is it still true that developers are familiar with BASIC? I would expect that JavaScript and maybe Python replaced BASIC as lingua franca. JavaScript looks simpler because it basically (pun intended) doesn't have a standard library to learn, with all the problems deriving from that.

Java doesn't seem a bad choice because if one sticks to the basics probably everybody can figure out what a simple program does. Smalltalk, I wonder how many people here ever read a Smalltalk source file [1]. Lisp, maybe more, at least to look once at all those funny parentheses (disclaimer, I wrote my fair share of Lisp but I know the effect it does on most people.)

[1] One random Smalltalk project from the list of trending Smalltalk repositories on GitHub https://github.com/svenvc/zinc

Re:Programming for Cats by xkriva11 on Saturday February 06, 2021 @03:18PM (#26049570)
What you see in the Zinc repository is (obsolete) serialization format, not the code the programmer works with.
Re:Programming for Cats by alisonkisk on Saturday February 06, 2021 @12:55PM (#26048336)
BASIC was commonly understood because it had no structure or boilerplate to learn, just a few commands.
Re:Programming for Cats by derefr on Sunday February 07, 2021 @12:15AM (#26052840)
I think you misinterpreted. It's not that more programmers know Java; it's that more programmers know a language with a syntax similar to Java.

I don't really know Java. But I know C, and Java looks enough like C that I can get what Java code is trying to do.

Personally, I've never learned any language with similar-enough syntax to BASIC, to understand what a (real, non-trivial) BASIC program is trying to do. Would I recognize a BASIC subroutine if I saw one? Probably not.

And it's not about a language having "less" syntax, either, but rather about it having very few syntactic features that're unfamiliar. Smalltalk is a rather large novelty the first time you see it. (`ifTrue`? You mean I've got to use closures to branch?)

Re:Programming for Cats by alexshendi on Saturday February 06, 2021 @12:06PM (#26047873)
"Java has so little syntax... ". I pronounce this the understatement of the (admittedly young) decade.
Re:Programming for Cats by nomdep on Saturday February 06, 2021 @12:15PM (#26047961)
I took Object Pascal, C, C++, and Visual Basic. Never Java