Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
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.
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.

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? ;)
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.

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.

Back to the bbq!
 
I'll always have a soft spot for PHP since it's what I learned with, and I still do some work with it on the side for fun, but my favorite is Java because it brings in a paycheck ;)
 
I don't understand, my friend. Scheme's features vastly outnumber C's features. But some do call Scheme a "minimalist" language because Common Lisp's features outnumber Sheme's features. Common Lisp includes many functions that Scheme doesn't have. But it's easy to write Scheme versions of them. For example, here's a Scheme function does what Common Lisp's count-if function does:

Code:
(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.

Oops! I forget to show you the list-comprehension way to write the code I wrote earlier.

Code:
def count_if(has_this_property, some_list):
   return [item for item in some_list if has_this_property(item)]

In Python, you might write,

Code:
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

But unlike the Python code, Scheme's filter makes the computer create a, possibly empty, list of elements of some_list that have the property. Some versions of Python include a filter function, though. in the ones that do, I'd write:

Code:
def count_if(has_this_property, some_list):
   return len(filter(has_this_property, some_list))

As you and my other friends here know, in functional programming you try to avoid explicit assignment statements and to evaluate expressions instead. That's partly because functional style shortens programs and helps avoid some bugs you'll find often in procedural programs.
 
Hi,

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

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
 
I don't understand, my friend...
Neither do I. I think that has something to do with the internet. It's designed to obfuscate intentions.

This is what I read (not saying that's what you meant):

In your earlier post you said Common Lisp == too big and bloated, Scheme is plenty for the job at hand (which you mentioned). Therefore you like C over C++ because it has plenty features, just like Scheme, and C++ is bloated like Scheme is.

I said, Nah, Scheme is much more sophisticated than C, I'm not buying the comparison. C, unlike Scheme, is a barebones language (albeit with a lot of gotchas). Well, lisp can be a very barebones language, but in a different sense. Obviously completely different types of languages, and I would say that functional programming is much more sophisticated (not always practical though).

Anyway, in your more recent post, you're saying: No wait! Scheme is a sophisticated language with lots of features! The opposite of what I read you to say earlier.

Now, my lisp is extremely rusty, I suppose Scheme is less bloated than Common Lips, don't quote me. But my main point is: C++ is better than C (for applications, not necessarily systems programming) because of several basic features. Concrete data types, templates for type-safe containers, RAII and Exception idioms, member functions for interfaces. Maybe a few other things. Operator overloading is very useful but in very limited cases.

I've read articles where people say, oh, don't bother checking all your error returns in C, it just makes your code to hard to read. Why, yes, it does. It also makes your code incorrect and prone to doing nasty things at inconvenient times. But C is a great language from 40 years ago.

I agree with you about perl, by the way. And C++, if you're forced to use all the bloat, then it gets so complicated you have to think deeply about every single little niggle. Just one reference type isn't enough! And if you want to use a functional language, just use a friggin' functional language. Computers are fast enough, and languages evolved enough, just about any mainstream language works just fine. Except Java, you still need a boatload of memory for that.

After writing all that, I realize nobody's going to bother reading it, and if they do I doubt it will convince anybody. But why erase a perfectly good rant?
 
Well, qtx43, my friend, I'm sorry I wrote poorly. Let me try again.

I detest C, C++, and other C-like languages.

I believe that C++'s features vastly outnumber C's features.

Professor Haas suggested Scheme instead of Common Lisp because he thought Common Lisp had too many features.

Compared to Common Lisp, Scheme is a small language. Although I may write Scheme versions of some Common Lisp functions, Scheme is still feature-full enough for me to do anything I want to do in it.

By the way, for object-oriented programming, I'd choose Eiffel.
 
Well, qtx43, my friend, I'm sorry I wrote poorly. Let me try again.
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.
 
Maybe so, but this is about your favorite language, not about what your boss makes you do to earn that paycheck.

My impression is, it's those employers along with academia that are carrying C++ down the road to oblivion. It started when some universities began requiring that every student, including even art students, take a C++ course.

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.

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.
 
I guess PET BASIC, for purely sentimental reasons. (My first programming language!)

Years ago I used to like or dislike particular languages, but these days I don't really care. I just try to identify and use whatever language is most appropriate for the given project.
 
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.

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.
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 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.
 
My first programming was Kurtz and Kemeny BASIC, the original BASIC. If you compare it to, say, Visual BASIC, the difference is major. But you'll still know that VB is a dialect of BASIC.
I guess PET BASIC, for purely sentimental reasons. (My first programming language!)
 
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.
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.

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.
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.
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.
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.
 
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.

The C primitives are useful though, in particular situations where there are lots of loops or in auto-release situations.

I don't even bother experimenting with Mono. I absolutely LOATHE cross-platform tools.
 
ChiltomWebb, please post a link to a website about SuperTalk. You've piqued my curiosity, but I couldn't find any information about that language, except the information you gave us. Thanks.
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
 
I've offended people, too, especially during political or theological discussions. That's what I get for my ultraconservatism, I suppose. I don't mean to insult anyone, though. Trolls join discussions to disrupt them. But I've never known why people with ultra-fragile feelings would take part in controversial online discussions with anonymous strangers. As for my prose, if someone else doesn't understand it, I usually assume that's my fault.
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.

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.

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.

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?

To turn the tables on the pragmatists, I asked them to imagine this scenario. I'm a computer company manager who wants them to write software for a network of TRS-80 Model I computers. The moment the employees complain that I'm asking them to program computers that have only 4K of RAM each, I say, "Don't worry about the severe hardware-limitations. You're brilliant enough to write tiny, blisteringly fast code, even for a TRS-80."

Hardly anyone thought about another problem that troubled me deeply. Say I'm a computer company that charges customers for computer time, for disk space, and for programmers' services. They programmers write bloated, inefficient programs that only they can understand. They shouldn't have been careless. But now that they have been careless enough to write slow memory-gluttons that could have been much smaller and much faster than they are, I, the company, am robbing my customers. They're overpaying for computer time, for storage, and for programmer time.
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.
 
Getting semi-back on topic...
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.
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.
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.
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.
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?
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.
...snip...
They programmers write bloated, inefficient programs that only they can understand.
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.

p.s. macrumors won't let that link go through, but I think you can figure it out.
 
I love to control every detail. But I've discovered that I write my best programs in declarative languages. Since functional languages help programmers, though maybe not me, write elegant, clearly correct programs, I'm willing to sacrifice some control for expressiveness.

No, I wasn't thinking about Java. Although I hate to think about the language, I programmed professionally in Cobol. At 49, I probably am older than many others who post here at MacRumors. So I've needed to use computational antiques. For example, those poorly-written Cobol programs ran on an IBM 370. Luckily, people usually think I'm in my 30s when they see me. Darn! Another digression. ;)
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.

You're right again, pal. Those programs were already ancient when I maintained them. Many customers were already using them, too. Besides, no one kept the original specifications for those programs. Looking back, I'm sure that rewriting would have been too pricey. On the other hand, if I needed to take a pay-cut to prevent robbery, I'd take one.
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.

I'm familiar with Brain_ _ _ _ because a friend of mine sent me a link to the Wikipedia article you sent me. BF is the strangest programming language I've ever read about.

One of my best friends adores Perl. So he bought me the O'Reilly book about it. "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. In fact, I can hardly believe how much my buddy can do in a line or two of it. But as I may have said before, I don't want a deliberately eclectic language that gives me countless ways to do something. Give me a programming language that excels at what it got designed for. 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.
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.

p.s. macrumors won't let that link go through, but I think you can figure it out.[/QUOTE]
 
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).
 
Edmund Gettier is a famous analytic philosopher who wrote some of his best philosophy on napkins, probably at cocktail parties. I've been known to write Haskell programs on napkins, but I avoid cocktail parties. If I got drunk, I'd be dangerous on all fours, especially when I was standing. ;)I walk on crutches.

The Bluffer's Guide to Philosophy is a gem designed to teach readers just enough philosophy to make them sound erudite at those parties. Maybe I'll write one about RISC architecture.
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).
 
"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.
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.

I like C++ being multi-paradigm, but it's a matter of degree. Structured programming for implemented algorithms, an pseudo-object oriented system for cleaner interfaces, RAII and exceptions for easier error handling, etc. But STL algorithms have always be awkward, and I think grafting on pseudo-functional language stuff will only help in a minor way. C++ is complicated enough, adding more random stuff to plug holes reminds me of nothing so much as they way MS seems to write their office software.
 
#1 is FORTH, the programmer's programming language.

I've always been a big C fan, never much liked C++. I HATED Objective-C when it first arrived in full force with Mac OS X, but have recently fell madly in love with it. As a die-hard C programmer, I have to say Objective-C is absolutely beautiful.
 
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.

Favorite quote EVER!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.