Programming Language and code aesthetics
-
If one says that the Object Pascal is the best language ever created I probably would agree. But pretty?!? It’s ugly like hell. Even using the “With” can't prevent code from looking like teenage chat-room.
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.
I'd argue that part of Object Pascal's "prettiness" is in it's uniformity. There's a precision to it's design that make it feel like something that was crafted and thought about, whereas C/C++ tend to feel like something that was just kind of grown from some crazy mad scientist's post-60's LSD trip, and then gradually beaten into shape to be something useful. While the verbosity can be a bit much, I'd agree with you on the "with" keyword, it also, IMHO, leads to very nicely laid out and well written code. Of all the code I've ever read, OP was the easiest to just fall into, and the best code I've ever read, bar none, is Borland's VCL source. It's clean, clear, and easy to follow, with largely logical names, well thought out design, it's just good stuff. Contrast that with most C/C++ code, which frequently is either a maze of cryptic, vowel challenged, 3 letter variable names, or an unreadable morass of hungarian notation, half of which doesn't even match up any more, plus the haze of pre-processor statements, which make you want to poke your eyes out trying to figure out what's going on.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
-
I'd argue that part of Object Pascal's "prettiness" is in it's uniformity. There's a precision to it's design that make it feel like something that was crafted and thought about, whereas C/C++ tend to feel like something that was just kind of grown from some crazy mad scientist's post-60's LSD trip, and then gradually beaten into shape to be something useful. While the verbosity can be a bit much, I'd agree with you on the "with" keyword, it also, IMHO, leads to very nicely laid out and well written code. Of all the code I've ever read, OP was the easiest to just fall into, and the best code I've ever read, bar none, is Borland's VCL source. It's clean, clear, and easy to follow, with largely logical names, well thought out design, it's just good stuff. Contrast that with most C/C++ code, which frequently is either a maze of cryptic, vowel challenged, 3 letter variable names, or an unreadable morass of hungarian notation, half of which doesn't even match up any more, plus the haze of pre-processor statements, which make you want to poke your eyes out trying to figure out what's going on.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
Jim Crafton wrote:
Of all the code I've ever read, OP was the easiest to just fall into, and the best code I've ever read, bar none, is Borland's VCL source. It's clean, clear, and easy to follow, with largely logical names, well thought out design, it's just good stuff.
I’m totally agreed with that. The VCL even the Indy components was masterpiece. Though some function names like “GetDefaultSystemFonts” are a little too verbose.:)
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.
-
I take heat for it but I love VB.net. C++ may look pretty form a distance but as she gets closer you start to see that her blouse is off by one button, one high heel is shorter than the other and her eyes are crossed in a wild and crazy look that makes you think she perpetually drinks way too much. Oh yeah, and her hair extensions are starting to come loose...
Ray Cassick wrote:
I take heat for it but I love VB.net.
As well you should.
m.bergman
-- For Bruce Schneier, quanta only have one state : afraid.
-
Does Code written in some languages appear more "beautiful" than other languages? Granted, there is an element of developer there too. But ignoring the developer, do code in some languages prone to appear more "ugly" than in some other languages. For example, to me code written in Java/C#/Python/JavaScript appear aesthetically more pleasing than that in Objective C or Scheme (even though I love Scheme) or Perl. What languages do you find "beautiful" ? or you don't think that there is an aesthetic aspect of a languages?
Proud to be a CPHog user
My vote for the prettiest language is PCL6. My vote for the ugliest language is PCL6.
m.bergman
-- For Bruce Schneier, quanta only have one state : afraid.
-
forth is prettiest (but not so useful in the long run) c++ is the next prettiest then c then 68000 asm the rest are are an absolute dog's breakfast... X|
Steve Hazel wrote:
forth is prettiest (but not so useful in the long run
You didn't take your meds today, did you? FORTH; blech.
Software Zen:
delete this;
Fold With Us![^] -
Christian Graus wrote:
Any BASIC derived language is ugly as sin. Objective C is ugly
I'd hate to see what kind of programming language you could get if you hooked those two up.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
bulg wrote:
__asm{...}
Not bad, at least compared to AT&T style assembly with gcc :rolleyes:
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
I take heat for it but I love VB.net. C++ may look pretty form a distance but as she gets closer you start to see that her blouse is off by one button, one high heel is shorter than the other and her eyes are crossed in a wild and crazy look that makes you think she perpetually drinks way too much. Oh yeah, and her hair extensions are starting to come loose...
Ray Cassick wrote:
C++ may look pretty form a distance
But rarely does. ...unless it happens to be standing next to VB... :rolleyes:
----
You're right. These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets.
-
Does Code written in some languages appear more "beautiful" than other languages? Granted, there is an element of developer there too. But ignoring the developer, do code in some languages prone to appear more "ugly" than in some other languages. For example, to me code written in Java/C#/Python/JavaScript appear aesthetically more pleasing than that in Objective C or Scheme (even though I love Scheme) or Perl. What languages do you find "beautiful" ? or you don't think that there is an aesthetic aspect of a languages?
Proud to be a CPHog user
I enjoy the look of C and JavaScript. Both lend themselves well to small, tightly-written functions. Of course, any language can be made ugly.
----
You're right. These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets.
-
Does Code written in some languages appear more "beautiful" than other languages? Granted, there is an element of developer there too. But ignoring the developer, do code in some languages prone to appear more "ugly" than in some other languages. For example, to me code written in Java/C#/Python/JavaScript appear aesthetically more pleasing than that in Objective C or Scheme (even though I love Scheme) or Perl. What languages do you find "beautiful" ? or you don't think that there is an aesthetic aspect of a languages?
Proud to be a CPHog user
I find the C-derived languages pleasing to look at. I am not a VB basher, but the code looks ugly. I am not familiar enough with other languages to comment on them.
Cheers, Vıkram.
Stand up to be seen. Speak up to be heard. Shut up to be appreciated.
-
Steve Hazel wrote:
forth is prettiest (but not so useful in the long run
You didn't take your meds today, did you? FORTH; blech.
Software Zen:
delete this;
Fold With Us![^]forth can be elegant. Like perl, it can also be an absolute dog's breakfast like the rest...
-
Does Code written in some languages appear more "beautiful" than other languages? Granted, there is an element of developer there too. But ignoring the developer, do code in some languages prone to appear more "ugly" than in some other languages. For example, to me code written in Java/C#/Python/JavaScript appear aesthetically more pleasing than that in Objective C or Scheme (even though I love Scheme) or Perl. What languages do you find "beautiful" ? or you don't think that there is an aesthetic aspect of a languages?
Proud to be a CPHog user
Depends on what you're used to. Even W finds his wife attractive. X| Over the weekend I glanced at some C code I wrote about ten years ago -- X| A colleague showed me an SQL function he was working on today -- X| I just glanced at an old Ada book I have sitting around (I never learned it) -- X| COBOL, BASIC -- X| Pascal not so much. But C# I really enjoy now. (Even though no one else would format it the way I do.) :~ I think the dividing line is whether or not the language uses BEGIN/END. The fewer "words" and the more symbols the better.
-
forth can be elegant. Like perl, it can also be an absolute dog's breakfast like the rest...
... Beholder, Beauty Eye of
Software Zen:
delete this;
Fold With Us![^] -
... Beholder, Beauty Eye of
Software Zen:
delete this;
Fold With Us![^]sooooooooooo true. Kinda Yoda like... (Like Grover I talk. SORRY!)
-
Does Code written in some languages appear more "beautiful" than other languages? Granted, there is an element of developer there too. But ignoring the developer, do code in some languages prone to appear more "ugly" than in some other languages. For example, to me code written in Java/C#/Python/JavaScript appear aesthetically more pleasing than that in Objective C or Scheme (even though I love Scheme) or Perl. What languages do you find "beautiful" ? or you don't think that there is an aesthetic aspect of a languages?
Proud to be a CPHog user
I found G (LabVIEW) most and really beautiful. Andrey.
-
Does Code written in some languages appear more "beautiful" than other languages? Granted, there is an element of developer there too. But ignoring the developer, do code in some languages prone to appear more "ugly" than in some other languages. For example, to me code written in Java/C#/Python/JavaScript appear aesthetically more pleasing than that in Objective C or Scheme (even though I love Scheme) or Perl. What languages do you find "beautiful" ? or you don't think that there is an aesthetic aspect of a languages?
Proud to be a CPHog user
I think C is still the most beautiful Language, though i do most of my job in C#.Yo can build outside world with C.That's enough to say C is the best.
Behzad
-
Mustafa, could I ask you something? Print the quoted one, find some notary sign it, put a seal and bind with a government apostil after that send it to me. It could be something like: I, down signed Mustafa Ismail Mustafa Hereby Authorize Deyan Georgiev to:
Mustafa Ismail Mustafa wrote:
Go out, enjoy a drink or four, meet some girls, meet some new people who aren't in the computer business
I need something more official for my wife.:)
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.
Deyan Georgiev wrote:
I need something more official for my wife
Uh... I've known women to become ferocious (for want of a much better word) when something tries to interrupt their control of their men. Pass. I value my life :)
Don't forget to vote if the response was helpful
Sig history "dad" Ishmail-Samuel Mustafa Unix is a Four Letter Word, and Vi is a Two Letter Abbreviation "There is no wealth like knowledge, no poverty like ignorance" Ali Ibn Abi Talib
-
Hey Mustafa, while you're at it for Deyan, could you send me one too? The wife's leash tends to be pretty short...
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
-
Does Code written in some languages appear more "beautiful" than other languages? Granted, there is an element of developer there too. But ignoring the developer, do code in some languages prone to appear more "ugly" than in some other languages. For example, to me code written in Java/C#/Python/JavaScript appear aesthetically more pleasing than that in Objective C or Scheme (even though I love Scheme) or Perl. What languages do you find "beautiful" ? or you don't think that there is an aesthetic aspect of a languages?
Proud to be a CPHog user
Motorola 6809 Assembly... I love PIC kept at the simple 8 bit level :-\ Then, despite the strong sentiments against: I love Basic Pascal, C & Fortran follow close. -=[ R ]=-
-
forth is prettiest (but not so useful in the long run) c++ is the next prettiest then c then 68000 asm the rest are are an absolute dog's breakfast... X|
imho Forth was (is ?) as much a "religion" as a computer language. i used to be "proselytized" by Forth adherents back in the 1980's; they had a gleam in their eye that signified they had found the great revelation : it was clear to me that spreading its "words" was accompanied by a "holy zeal." by the way i have nada against languages with RPN and an explicit stack; for many years PostScript was my bread and butter. but, for me, PostScript was LISP in drag as a printer controller language. with PostScript (as well as Forth and LISP) it's easy to write unmaintainable code that is idiosyncratic to the nth. degree, needlessly recursive, self-re-writing, etc. : all of which, from another perspective can be a very good way for a programmer to write a continuous employment contract for themself forever and ever. :) best, Bill
"The greater the social and cultural distances between people, the more magical the light that can spring from their contact." Milan Kundera in Testaments Trahis