Maybe so, but this is about your favorite language, not about what your boss makes you do to earn that paycheck. And apparently somebody, somewhere decided that he liked the particular features you don't like.No, but there is great emphasis in some workplaces now on doing C++ a particular way. It's the herd effect partly. But C++ has fueled a kind of bravado in some people that is founded on laziness. Like "Topper" from Dilbert, some C++ geeks insist their way is the best, biggest, and most correct way, not because it is but rather because they are too lazy to explore other options, or they loathe the difficulty of actually implement something.
Sure it'd be nice without all the bloat, I don't much like the direction C++ is heading, i.e. more bloat and pseudo-functional language stuff.Years ago, I asked a computer scientist what programming language he would suggest for the natural language interface I planned to write. "Scheme," he said, "because Common Lisp is too big." That answer puzzles me even now because I need only a few Lisp features for that application. Besides, I probably would write natural language software in Prolog because its inventors designed it for natural language processing.
Bloat may be why I've always disliked Perl. It gives you many ways to do the same thing. Hmm, I wonder why its name stands for Pathologically Eclectic Rubbish Lister. What's eclectic: the rubbish, the lister, or both?![]()
(define (count-if has-this-property? some-list)
(length (filter has-this-property? some-list)))
But your "Common Lisp to Scheme is like C++ to C" doesn't convince me, because C is such a barebones language; C just does not have some very useful features. Write a general purpose container in C, for example a red-black tree like std::map, and look at the mess that the API becomes in C.
def count_if(has_this_property, some_list):
return [item for item in some_list if has_this_property(item)]
def count_if(has_this_property, some_list):
how_many = 0
for element in some_list:
if has_this_property(element):
how_many += 1
return how_many
def count_if(has_this_property, some_list):
return len(filter(has_this_property, some_list))
What's your favorite programming language and why? I plan to do use Haskell, OCaml, Prolog, and Lisp from now on, but I'm open to better ideas. Thanks.
Bill
Neither do I. I think that has something to do with the internet. It's designed to obfuscate intentions.I don't understand, my friend...
No no, you're not writing poorly, I'm sorry for making it sound that way. It's just if you're not exhaustively complete people assume things you didn't mean, writing completely clearly is really hard. We don't have time for that on casual posts on the internet.Well, qtx43, my friend, I'm sorry I wrote poorly. Let me try again.
Maybe so, but this is about your favorite language, not about what your boss makes you do to earn that paycheck.
No no, you're not writing poorly, I'm sorry for making it sound that way. It's just if you're not exhaustively complete people assume things you didn't mean, writing completely clearly is really hard. We don't have time for that on casual posts on the internet.
Anyway, I don't think C++ is worth detesting, anything is going to be imperfect. Use it for what it is when appropriate...or not, life is too short to take jobs doing things that frustrate you!
I wouldnt say favorite, but my preference is Objective-C/Cocoa. C#/.Net (My other language) is easy with lots of syntactic sugar. But that comes with a massive price. Lots and lots of boilerplate code.
Plus I like that in Objective-C/Cocoa, apart from primitives just about everything is an object, including the UI and things like the message parsing syntax.
One thing I do like about C# and Visual Studio specifically is code sense that actually works.
I guess PET BASIC, for purely sentimental reasons. (My first programming language!)
Lot of work too, I suppose. A while back I did write lexxer/parser that produces the syntax tree from a grammar. Late 90s, I guess. Kind of like flex/bison but all self-contained as a command line filter program. It was fun, maybe one day I'll dig it out, clean it up a little bit and try to make it a front end for llvm or something. Things like that have evolved enough that it's actually possible to produce something decent.Anyway I'd say my favorite language is the one I'm creating myself. It's similar to C but emphasizes x86 optimizations. I'd encourage you all to take a stab at writing a compiler as it's great fun.
The problem with the internet is there are so many trolls and people with touchy feelings you never know who and what you're dealing with. It's the most annoying thing about discussion boards. And I probably offend half the people I talk to without even realizing it, not in real life, just on the internet. Oh well.Qtx43, thank you. You didn't even hint that I wrote poorly. But I should have written in more detail. Some philosophers tell me that I write very clear prose. Maybe I do, I just wasn't trying hard enough when I wrote the post you've just answered.
Clarity and obsessive perfectionism is a prerequisite for superb I guess, but not the only thing. And no matter where you go, there are people who care and people who don't care, I suspect, even in universities. Or maybe I should say, care about different things. I can't judge my own stuff objectively, not matter how obsessive I am. It's probably just your average stuff that usually works.You're right: C++ isn't worth detesting. The other good news? Since I don't program professionally anymore, nobody is telling mw what programming language to write in. So I can be as perfectionistic as I want to be, and I won't need to hear anyone complain that I'm still in the university, not in the real world. If I need to choose between a university and a programming shop where nobody cares about whether he writes superbly-designed programs, I'll always choose the university. I'd rather be a professor. I'm not even implying that my programs are superb. But I try my best to write ultra-readble programs that should be easy for anyone to understand when he knows the language they're written in. And I'd be embarrassed to sign many programs I've read.
I really like C#. What you say about Obj-C is more true of C#... EVERYTHING is an object. 9 is an object, an instance of Int32. There are no 'primitives' like in C/C++/Obj-C, or even in Java.
As to the volume of boilerplate... the majority of that is Visual Studio. I do a lot of my C# using Mono on my MacBook Air, with a plugin for TextMate that does syntax highlighting. Using the command line tools in Mono or even Windows lets you get a lot closer to the build process and things feel less... bulky. For small projects, I try to avoid VStudio as much as possible.
On the other hand, there's a lot of nice things VStudio does for you; as you say, Intellisense is awesome, and the way it handles adding web service references and other tricky situations is very nice. But most of my toy programming is command-line, and done on a Mac, with a plain text editor.
Hi,
SuperTalk, because it's so close to human english that I can write in it mere seconds before my face hits the keyboard.
Objective-C, only because it's weird and quirky, and neato when it does what you think it's going to do.
The rest are all the same to me, but I've been doing this 'programming' thing for awhile (28 years).
-Chilton
The problem with the internet is there are so many trolls and people with touchy feelings you never know who and what you're dealing with. It's the most annoying thing about discussion boards. And I probably offend half the people I talk to without even realizing it, not in real life, just on the internet. Oh well.
Clarity and obsessive perfectionism is a prerequisite for superb I guess, but not the only thing. And no matter where you go, there are people who care and people who don't care, I suspect, even in universities. Or maybe I should say, care about different things. I can't judge my own stuff objectively, not matter how obsessive I am. It's probably just your average stuff that usually works.
While realizing that efficiency (both speed & size) depends on algorithms and data structures chosen, still...the obsessive part of me likes to control every little detail. This is one reason I prefer structured programming to functional (C vs lisp or haskell). And to an extent, functional or logic programming pushes you into certain styles of algorithms that aren't necessarily so efficient. And they don't make it easy to choose your data structures.I "obsess" about much more than clarity. Ask any programmer who knows me well. He'll tell you that I'm an efficiency fanatic, too. I've always been a perfectionist. The perfectionism increased, too, when I worked with programmers who seemed not to care about the quality of the programs they wrote.
To be fair, it all depends. How buggy is it, how long would it take, can you do it piece by piece or does the whole architecture have to go? This is risky. And it costs money, money which comes out of your potential salary.Years ago, I maintained programs that probably should have been rewritten. I suggested that we rewrite them. So I got the usual answer: This is the real world, Bill; we don't do that. The "real-worlders" were content to frustrate themselves by staring for weeks at buggy code.
You were thinking about Java when you wrote that, right? For years all the apologists kept insisting Java is just as fast as C, and then the next year they said: ya but now, Java really is just as fast as C. I suppose, finally, it is, but only if you have gobs of memory and aren't counting start up time. It is nice to have useful libraries that pretty much work without headaches. With C, there may be plenty of libraries around, but somehow they never seem to exactly work right without tweaking and don't do exactly what you want.Did they care about efficiency? No. You know what many practical programmers say today, "Processors are fast, and memory is cheap. So don't worry about efficiency." What would they say if computer designers took the same kind of attitude?
It's not for nothing that C has an obfuscated code contest. Perl doesn't need one, it'd be like kicking somebody when they're already down. Like your former boss said, welcome to the real world. You can write garbage in any language, but I think the perverse have definitively shown that all languages are not created equal. So score one for lisp over C in the clarity department....snip...
They programmers write bloated, inefficient programs that only they can understand.
While realizing that efficiency (both speed & size) depends on algorithms and data structures chosen, still...the obsessive part of me likes to control every little detail. This is one reason I prefer structured programming to functional (C vs lisp or haskell). And to an extent, functional or logic programming pushes you into certain styles of algorithms that aren't necessarily so efficient. And they don't make it easy to choose your data structures.
To be fair, it all depends. How buggy is it, how long would it take, can you do it piece by piece or does the whole architecture have to go? This is risky. And it costs money, money which comes out of your potential salary.
You were thinking about Java when you wrote that, right? For years all the apologists kept insisting Java is just as fast as C, and then the next year they said: ya but now, Java really is just as fast as C. I suppose, finally, it is, but only if you have gobs of memory and aren't counting start up time. It is nice to have useful libraries that pretty much work without headaches. With C, there may be plenty of libraries around, but somehow they never seem to exactly work right without tweaking and don't do exactly what you want.
It's not for nothing that C has an obfuscated code contest. Perl doesn't need one, it'd be like kicking somebody when they're already down. Like your former boss said, welcome to the real world. You can write garbage in any language, but I think the perverse have definitively shown that all languages are not created equal. So score one for lisp over C in the clarity department.
Machine Language. It makes you sound so clever when you say you code in Assembly Language at cocktail parties. At least cocktail parties in the Math Department (which generally involve a bunch of tenure wanna-be's huddled around a bottle of Jim Beam grousing about no one recognizing their genius).
Being useful is something to like. Few things are all bad. I'm not sure if Perl is an improvement over more traditional shell programming, but neither one is wonderful for large programs."You don't like anything about the language?" he asked. Sadly, the only honest answer I could think of was "no." So I said "no." Perl is very useful.
...
Don't give me an integrated package that's a jack of all trades and a master of none. I don't need a multi-paradigm programming language because I don't mix paradigms when I program.
C++ is like the pretty, innocent girl that looked so promising at 16, but then got mixed up with self-interested louts who just wanted to use her, and now at 30 she's fat and strung out and has ten kids by ten different men. I can interact with her, but she still has the stink of other men permanently on her, and the kids.