randyg wrote:Code: Select all
int main(void){int e=1,s=-1;while(s++,e)printf("%c%s",((e="0@ />\
^&[S#$( 0@ 1B(&+8 $( ^[#/>(JZS!?_!0@ !*(2* #$( 0@ !2^&[[!$( W=W=\
W=W=W=W=/R'?.!/$Y$!/G$!!$1!1H$%A@H(!!$1!10$%!GH(!!$1!10$%!H((R'$\
.?/0XX@'G$"[s/6])-32)&1<<s%6?'1':32,(s+1)%78?"":"\n");return 0;}
:
:
note that I've yet to see a BASIC program look like line noise. it may look like the person who wrote it should be shot, but it can't look like line noise. it's missing all the fun operators needed.

Well, yes, but that's in line with what I was saying (in an overgeneralized way, it seems): Some languages have extra things in them that let you write more compact, less readable code. Some languages have digraphs and trigraphs to replace characters like '
randyg wrote: may not exist on all keyboards around the world. However, all languages have operator precedence, making the use of parens optional in some cases. You can let operator precedence pair up the parts of a complex expression. Put it all on one line, and voila! Your "if"-statement will be unreadable by most mere mortals.
randyg wrote:Of course, if you really want ugly, ...
Listen, to paraphrase the noted linguist, John McWhorter, no language is inherently "uglier" or "harsher" or "more logical". That's 1 part personal aesthetics, and purely subjective, and 10 parts ego because you don't know the language (or don't know it well enough) and refuse to admit it.
I have found this to be true of human beziehungsweise computer languages.
randyg wrote:However, I never wrote any of these as serious programs. Something about perl fans seems to make them consider line-noise to be an acceptable coding style.

Oh, that's just the complex regexps and 2-char builtin variables. You can (and I do) type that extra "my $basenamePlusVersionNumber = $_;" to make the code literate. And it only takes a bit of learning to discover that:
Code: Select all
for ($someStringOfMine) {
s/^\s*//;
s/\s*$//;
}
...is pronounced, "Trim whitespace from both sides of the string, '$someStringOfMine'."
Larry Wall has stated that he wrote Perl with, "There's more than one way to do it," in mind.
As for languages, I have a complaint with Python. Not because I'm some Perl evangelist who's threatened by Python. Nope. It's part aethetic, part age-related.
Aesthetics: We decided back in the 70's that making whitespace a syntactic element of a programming language was a Bad Idea. Why resurrect a bad idea rejected 20+ years ago?
Ageism: Sure, you young'uns may be able to set your screen resolution to 1600x1200 with an 8-pt font to get 200-char long lines. You whippersnappers may be able to eyeball the start of a line and instantly know how many tab characters that indistinguishable whitespace equals.
Those of us with poor eyesight growing poorer with age can't. We need that extra visual guide of a '{' and '}' to tell which nested block we're in. We need larger fonts and lower resolutions, meaning shorter line sizes.
Consequently, due to my aged eyes, I actually find Python
less readable than Perl, which I freely admit can get squirrelly. Was it
really all that horrible to add '{' '}' to Python? Miguel de Icaza still could've required that, "A '\n' must be followed by a '\t' or a printing character. Any other whitespace at the start of a line is an error," and he'd have his style-enforcement, without making whitespace a language syntactic element. Heck, he even could've required that block start/end chars '{' and '}' must appear alone on a line, preceded only by '\t'. (And he could've been really nice to those of us aging by using a ' ' as the Lone Valid Whitespace Padding instead of a '\t'.)
But, ultimately, my complaints about Python reveal something deeper: It is
Pure Hubris to believe that you can write a programming language that enforces "good" style. It's like "idiot-proof" devices: G*d will design a better idiot. Likewise, there's no way to enforce good coding style using a language's syntax. Someone will find a way to abuse it.
Wow. A lot more than I intended to write.