4 ms·
Of all the strengths that Java and C have, I would not call syntax one of them. :) So this title seems quite strange. Not the sales pitch I would make. It is u
by hmry 1y ago
Of all the strengths that Java and C have, I would not call syntax one of them. :) So this title seems quite strange. Not the sales pitch I would make.
It is understandable though, considering this language is 30+ years old. Probably not the decision you would make if you were to design it today: Switch statement with labels+fallthrough instead of a switch/match expression (even Java replaced that one with a switch expression nowadays), ?: ternary operator instead of if expression (the Pike docs even call that one ugly and recommend not using it)...
- deleted 1y ago[deleted]
- chrsw 1y agoI think they point they're making is the syntax is familiar to what you probably already know.
- em-bee 1y agopike is based on LPC which stands for "Lars Pensjö C" which was developed in 1989. at the time C dominated the language landscape. sufficiently popular alternatives were BASIC, pascal, lisp, smalltalk, TCL and perl. i don't think there was much else. at least in the unix world. lars probably was familiar with C and that's what he based the language on. i think python was really the first non-C-like language that became very popular. i am not a fan of the C syntax myself, but at the time, i was mostly familiar with it, and i wasn't even considering the idea that there could be a better syntax. later though i did develop a preparser that would allow me to write pike in a python like syntax. it was a hack made as an april fools joke. but it was actually working. it was called nessie.
- cmrdporcupine 1y agoI guess the other well-known syntax form at the time was the one in the Algol/Pascal/Ada/Modula-2 tradition with keywords (begin/end, if/endif, etc) for structuring blocks and that's what MOO cribbed from, while LPC (and later JavaScript, Java, etc.) did the braces thing. At the time I liked braces a lot more but since then have come around to preferring the more Wirth-ish style. I think Julia has shown that a dynamic lisp-ish language can do this very elegantly.