I do think there are bad languages. Brainfuck is terrible. Maybe there are no bad serious languages, but you'll have to define what you mean by serious, and you'll have to argue with Dijkstra's ghost when it comes to COBOL et al. (though I think he would have liked J). (His two famous quotes against COBOL come from http://www.cs.virginia.edu/~evans/cs655/readings/ewd498.html) I don't think good/bad is really the best way to judge languages, I'm more interested in language power, fluidity, and library support.
I'd agree that every language has a purpose, even if the purpose is as simple as making a joke like in the case of LOLCODE, and that people abuse the language beyond its intended purpose. I read somewhere someone asserting "Design patterns are missing language features" and I more-or-less agree with that.
I do think there are bad languages. Brainfuck is terrible.
Brainfuck is not terrible, it's just not easy on human eyes. Brainfuck is really a very simple 8 instruction turing machine designed to have the smallest possible compiler on the Amiga (240 bytes, at that). It is actually a derivation of p'', which is a programming language from the 60s used to describe a family of turing machines.Now, for a truly terrible language, I introduce you the only programming language named after the eighth circle of hell in Dante's Inferno...
@@@@@@@@@@ @@@@@@ @@@ @@@@@@@ @@@@@@ @@@ @@@@@@@@ @@@@@@@@
@@@@@@@@@@@ @@@@@@@@ @@@ @@@@@@@@ @@@@@@@@ @@@ @@@@@@@@@ @@@@@@@@
@@! @@! @@! @@! @@@ @@! @@! @@@ @@! @@@ @@! !@@ @@!
!@! !@! !@! !@! @!@ !@! !@ @!@ !@! @!@ !@! !@! !@!
@!! !!@ @!@ @!@!@!@! @!! @!@!@!@ @!@ !@! @!! !@! @!@!@ @!!!:!
!@! ! !@! !!!@!!!! !!! !!!@!!!! !@! !!! !!! !!! !!@!! !!!!!:
!!: !!: !!: !!! !!: !!: !!! !!: !!! !!: :!! !!: !!:
:!: :!: :!: !:! :!: :!: !:! :!: !:! :!: :!: !:: :!:
::: :: :: ::: :: :::: :: :::: ::::: :: :: :::: ::: :::: :: ::::
: : : : : : :: : : :: : :: : : : : :: : : :: :: : : :: ::
EsoLangs wiki entry: http://esolangs.org/wiki/Malbolge
99 Bottles: http://99-bottles-of-beer.net/language-malbolge-995.htmlWriting programs in Malbolge is so difficult, typically one has to use another language to generate programs and search for a working malbolge program, or make extremely large programs that go on for pages.
You have been warned!
How well do you know PHP?
It's not a gui programming language. It's not a text-handling programming language. It's not a symbolic programming language.
But it's used as those, constantly.
Pointer-based errors are endemic to C; they ought to be an expected part of the language usage by now. There are reasons why static analysis tools such as Klocwork are out there, and are very expensive... and keep being bought. Because C is bad for an incredibly large range of tasks that it keeps getting used for. I've done some of that, and using C (or C++) made things harder and more error-prone.
It's also very good at other tasks... like writing OS kernels or drivers. I've done some of that, and C made it possible.
Although at this point, I'd be interested to give writing an OS in D a spin to see how it works.
I'm confused by what you mean. What is this "higher level" that functionality should exist at that is above libfoo.so?
But should it be?
I think it's probably a mistake to teach OOD/OOP in an introductory course and would rather see types, assignment, flow-control, etc. covered in a thorough manner. As it was, he ended up with big gaps in his general knowledge.
My rationale is that I can easily start just by letting the students type into REPL while they're learning basic concepts like assignment and operators. Classes are there when you need them but can be ignored until the students are comfortable with both the language syntax and the basic concepts behind programming.
I hate classes where the instructor says "just do this without asking why for now" ... and I learn best when I can experiment freely and iterate quickly.
There is another axis of 'badness', other than suitability for the problem domain. C's main problem is features that look fine but might subtly invoke wrong behaviour - the infamous traps and pitfalls.
If you can accept this view, then there /can/ be such a thing as a bad language, and it can be possible for two languages to suit the same domain and one to be better than the other. The domain that C serves well is not going away (though it might shrink, as more suitable tools are used for things like compiler-writing), but a better langauge for the domain could come along in the end.
If it's irrational to reject multi-language solutions (I believe it is), why do people keep doing it?
When the DoD started what became the Ada mandate, they had some insane number of languages and projects scattered about. I don't remember the exact number but think something like 450-500 and this was from the 1960s and 70s when they still weren't terribly digital. At the macro level, that's impossible to maintain. I think a large part of the multi-language dislike came out of that. There is a giant difference between 3-6 languages and 400, it's also harder to get good people once you add a new technology to the stack that they need to know. There are generations of developers and IT/IS guys that have been trained and warned of the dangers of polyculture. That's why people keep doing it.
I've worked on a number of mixed-language projects, and these same issues keep cropping up. Perhaps it depends on the team, but that is not something not everybody gets the chance to choose. My current mixed-language program (tcl/C++) is working out OK, with just me working on it, but tool support is poor, and hand-writing the language interfaces is annoying.
(Notable exception: Visual Studio 2010 looks to offer pretty decent mixed native/managed debugging, and the CLR has good C++ interop support.)
I haven't had the opportunity to try it yet, I only heard about it a couple of days after the last time it would have been really really useful (naturally). But I know it's going to come up sometime.
Now seems doubly annoying that Apple make you use lldb or crappy old gdb 6 for iOS.
The little bit I have seen of multi language code would say that that holds, especially if the languages involved are not C and something else(What does a Python dictionary look like in Haskell? Answer: Crap unless you do a bunch of translation work). Debugging tools don't tend to work across language boundaries. etc. Maybe I gave up to quickly, but multiple languages in one executable just doesn't seem worth it. Writing components in different languages and have them communicating over some sort of shared bus, web services, whatever is simple and fairly effective.
There's actually no such thing as a bad language. I enjoy language wars as much as anyone else, but languages are only good or bad relative to the type of problem they're being used for.
For example, what makes C++ and Java odious is that people try to use them for inappropriate purposes. They aren't platonically "evil" languages, and they weren't designed by stupid people; they're just inappropriate for over 90 percent of what modern programmers have to do in their professional lives. When people need high-level features and don't have them, they tend to roll their own-- badly. This is Greenspun's Tenth Rule and the heart of those god-awful "design patterns".
C++ and Java, for all that, also have domains in which they're the appropriate languages to use. They're just very small.