They share syntax, and you can use C-specific syntax and libraries in C++, but they are entirely different languages. Different paradigms, in fact. Mastery of one does not imply mastery of the other, IMO.
I think the M has some importance as well No, it’s not a language. It doesn’t actually order the computer do anything, it’s just a set of notes saying how to draw something up. It’s as little a language as a bitmap. Nowhere is HTML translated into machine code.
Well, everyone’s taken issue with my “C++ is pretty much a superset of C; if you can write C programs, you can pretty much write them as C++ programs; if you can read C++ programs, you can pretty much read C programs” position, and understandably so, but I stick to it, at least so far as this question is concerned (and, yes, I’ve had extensive experience with each qua itself). Idiomatic C style for certain tasks will certainly differ from idiomatic C++ style, but not to the level that I would consider it a language issue, per se; at least, if we’re going to pay such attention to differences not of fundamental language design decisions but merely of programming style in answering “How many programming languages do you know?”, then one could consider double- and triple-counting a great many other languages, depending on what styles of programming within them one is comfortable with. Of course, such silliness would just augment my point that all these counts involve a huge number of subjective judgements anyway.
I’ve forgotten how many and I’ve forgotten most of them. Don’t really program anymore, and it seems that the concept of a programming language is also becoming a bit murky.
For various degrees of “know”:
C
C++
Pascal
Object Pascal (Delphi)
Visual Basic 6
Java
C#
TCL
Standard ML (including FreshML)
O’Caml
Haskell
Prolog (including alphaProlog)
Scheme
Javascript
UnrealScript
x86 Assembly
Some other assembly that I’ve been forced to teach, but can’t remember the name of the chip (ARM)?
Matlab
Various markup languages (LaTeX, HTML, CSS)
Also have a passing acquaintance with Maple, Mercury, and some more that I’ve forgotten :smack:
Nor is Perl.
bash/ksh/sh… I’m a sys admin, I can script.
C
PASCAL
FORTRAN (5 & 77)
COBOL
AOS/VS cli (damn it, I can’t remember the name, it was a scripting language for DG MV15000s but we just called it cli)
Perl
BASIC
Sure it is. It’s interpreted on the fly, and all your pretty instructions are fed into the processor. Same as JAVA (though via a couple of abstraction layers).
HTML is every bit as much a language as C++ is. It’s a set of strings over a specific alphabet that are derivable by a formal grammar. That makes it a formal language. It’s not a programming language for reasons discussed above, but it is still a language.
Well, in that case, same as HTML: every element of description eventually gets interpreted and fed into the processor when a document is rendered. But it doesn’t matter where the instructions or other language elements go; a Java program is still a Java program if it’s never compiled, interpreted, or run, even it’s just written in pencil on paper and never gets anywhere near a computer. What matters in deciding whether something is a programming language is whether strings in the language semantically describe computation or something else.
So is HTML. It’s not a useful definition. XSLT is an example of an XML based programming language. HTML isn’t.
Java, C#, Ocaml, and Matlab. Also a bit of Verilog, if that counts.
I believe the intention of the OP is about Turing Complete type of programming languages.
Using that criteria, HTML is not included.
If we include HTML, we may as well include “email addresses” (RFC 5321) as a “programming language” because the tokens separated by “at” @ “dot” (.) is parsed and fed as instructions to DNS computer chips across the continent to route SMTP mail packets to the correct target.
All of these are pretty rusty, but I could probably pick them back up again with a little practice.
Most proficient:
Java
C
Some experience:
FORTRAN 77
Perl
Lisp
Smalltalk
Prolog
I screwed around with once or twice:
BASIC
TI-83 BASIC
That’s not including some assembly crap, and I could probably muddle my way through C++ or C# just fine.
SQL is also not Turing complete, but is specifically counted in the OP.
I think several of us might be talking somewhat at cross purposes here; some seem to be using “language” when they mean “programming language” and vice versa. Valid email addresses certainly don’t constitute a programming language, but they do constitute a formal language, and that distinction seems to be causing most of the dissonance on that subject.
Also, I’d say that HTML should be excluded because of its semantic nature before being excluded because it isn’t Turing complete (which is pretty much a given since it doesn’t describe computation). The Wikipedia article you linked to even mentions some programming languages that are not Turing complete, such as Epigram. In fact, my Banana language began as an extension to another language I had written, which has a C-like syntax and ostensibly describes computation, but is not Turing complete.
ultrafilter: I’m not really sure SQL should count anyway, since as its own name suggests it’s a query language, not a programming language.
He “guessed” SQL might be counted.
Maybe it’s too imprecise because he also says,
“able to code something more than just ‘Hello World’. At least a personnel management system with file I/O”
…which you can’t do with SQL SELECT UPDATE DELETE INSERT but might be possible with with MySQL stored procedures (loops, variables, etc.) . Either way, you can’t code HTML to create a file management system with file I/O.
Thanks for clearing that up.
I also just realized I quoted the wrong person.
XQuery is also a query language, but it is Turing complete. Ultimately, there’s no nice criterion for what’s a programming language and what’s not, and you have to introduce more or less arbitrary distinctions.
Also, by that definition, plain JavaScript isn’t a programming language, because it doesn’t directly support file I/O, so I just ignored it and included both SQL and JavaScript.
As language lawyers so like to repeatedly remind… we can “differentiate the language from the runtime.”
If the browser is the “runtime” then Javascript is handicapped.
But… if we think of Google Docs on Google’s GFS as files on a file system, the Google cloud can be thought of as one huge runtime for Javascript. Therefore, Javascript could write a file management system.
Yep… that’s really reaching…
…and it busts open the definition of “programming language” so wide open that it can include the Tivo remote as being “Turing complete.”