# Coding languages?

**URL:** <https://boards.straightdope.com/t/coding-languages/155833>\
**Category:** In My Humble Opinion\
**Created:** [February 18, 2003, 7:21am UTC](https://boards.straightdope.com/t/coding-languages/155833 "2003-02-18T07:21:49Z")\
**Posts on this page:** 3\
**Page:** 3

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [February 19, 2003, 11:18pm UTC](https://boards.straightdope.com/t/coding-languages/155833/41 "2003-02-19T23:18:24Z")

</div>

> [@](#):
>
> \*Originally posted by Flymaster \*  
> \*\*Would you agree, then, that under your definition, Microsoft Word is a programming language? And if not, then what differentiates Word from HTML? \*\*

Well, for starters, Word is an application, and HTML is a language. That makes them a bit difficult to compare–it’s a bit like wondering whether Visual C++ is a programming language. It’s not, because it’s an application.

I think you meant to ask “Is the markup used to make the native Word file format a programming language?”. It seems odd, but to be logically consistent, I suppose I have to say yes. It’s similar to postscript and HTML in purpose and ability.

What seems to be the defining characteristic for most folks is Turing-completeness. Roughly speaking, that’s the ability to do anything that can be written in C. I think we all agree that anything with that property is a programming language.

Most people also tend to think of imperative languages first, but Prolog and Lisp are good examples of non-imperative languages that everyone would pretty much have to count.

The fact that some languages are interpreted rather than compiled (or rather, some are interpreted by software and others by hardware) is also not particularly relevant. perl and C are both programming languages.

The area of contention is whether Turing-incomplete languages fit the bill. What about a language to describe a series of mouse and keyboard inputs? I wrote something like that once–it was actually a C++ class that would simulate a user interacting with a Windows app.

I maintain that any set of strings that can instruct a computer as to what to do are a programming language. I realize that this is not what most people have in mind, but I don’t know of any definitions that agree with people’s intuition.

Just FYI, I’m actually in the process of designing a simple scripting language, and it’ll end up being very close to Turing complete (it needs arithmetic and logical operators first), although limited in its intended scope. So I have put some thought into this and other related matters, and I may be something more than just a crackpot. 😉

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [February 19, 2003, 11:25pm UTC](https://boards.straightdope.com/t/coding-languages/155833/42 "2003-02-19T23:25:34Z")

</div>

> [@](#):
>
> \*Originally posted by Flymaster \*  
> \*\*Would you agree, then, that under your definition, Microsoft Word is a programming language? And if not, then what differentiates Word from HTML? \*\*

Well, for starters, Word is an application, and HTML is a language. That makes them a bit difficult to compare–it’s a bit like wondering whether Visual C++ is a programming language. It’s not, because it’s an application.

I think you meant to ask “Is the markup used to make the native Word file format a programming language?”. It seems odd, but to be logically consistent, I suppose I have to say yes. It’s similar to postscript and HTML in purpose and ability.

What seems to be the defining characteristic for most folks is Turing-completeness. Roughly speaking, that’s the ability to do anything that can be written in C. I think we all agree that anything with that property is a programming language.

Most people also tend to think of imperative languages first, but Prolog and Lisp are good examples of non-imperative languages that everyone would pretty much have to count.

The fact that some languages are interpreted rather than compiled (or rather, some are interpreted by software and others by hardware) is also not particularly relevant. perl and C are both programming languages.

The area of contention is whether Turing-incomplete languages fit the bill. What about a language to describe a series of mouse and keyboard inputs? I wrote something like that once–it was actually a C++ class that would simulate a user interacting with a Windows app.

I maintain that any set of strings that can instruct a computer as to what to do are a programming language. I realize that this is not what most people have in mind, but I don’t know of any definitions that agree with people’s intuition.

Just FYI, I’m actually in the process of designing a simple scripting language, and it’ll end up being very close to Turing complete (it needs arithmetic and logical operators first), although limited in its intended scope. So I have put some thought into this and other related matters, and I may be something more than just a crackpot. 😉

---

<div class="post-metadata">

**Author:** ![DaveW](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@DaveW](https://boards.straightdope.com/u/DaveW)\
**Post date:** [February 20, 2003, 3:03am UTC](https://boards.straightdope.com/t/coding-languages/155833/43 "2003-02-20T03:03:18Z")

</div>

**Derleth** wrote:

> [@](#):
>
> Dave: I’d disagree with you about the `line noise’ thing: When reading Perl, for example, I know right away that $a is a scalar and @a is an array and %a is a hash.

Well, it’s not _just_ that that bugs me, but more the mess of symbols used when parsing strings. I think it’s great to have string-parsing built-in, but yeesh.

> [@](#):
>
> It’s a constant visual reminder, so I don’t have to store so much state in my head when I go back to maintain something I wrote.

On the other hand, that “constant visual reminder” bugs the heck out of me when it’s obvious, contextually, what a variable is. Which is why I never used… Uh… What was it called?.. Hungarian notation?.. if I could at all avoid it. The prefixes and other conventions which Microsoft jammed into their C/C++ packages all do the same thing, and it’s annoying as hell.

If I can’t immediately grasp the nature of a variable just from its context, it means one of two things to me:

A) the programmer is using a variable in a new and possibly-interesting way, or  
B) this part of the code is really complex, and I need to slow down and really _look_ at it, anyway.

Either way, most of the prefixes and suffixes just mean “extra typing” to me. Well-named variables are much better, in my opinion, than forced reminders. And in a proper OO environment, a lot of those conventions just break the encapsulation, anyway.

> [@](#):
>
> On the same token, Perl has a lot of nice features that are open to massive abuse. But so does C, with its love of pointers and roll-your-own types, and, well, any language that allows any kind of advanced programming.

Well, pretty much any language, for that matter. GOTO in BASIC was a nasty piece of work.

> [@](#):
>
> By preventing people from doing stupid things, you also prevent them from doing interesting things. Which is why I generally hate BASIC: It’s too limited to be used as anything but what its designers intended it to be used for.

Back when I was in high school, my best friend and I had gotten so bored with most of what we could do with normal, everyday BASIC that we started writing self-modifying BASIC programs. We didn’t get far before graduation, but I recall we’d at least figured out how to change the destination of a GOTO in memory. PRINT statements, too, but those were easy.

> [@](#):
>
> Contrasted with C, the `portable assembly language’…

Does anybody know who first said “C combines the power of assembly language with the legibility of assembly language”? I’m curious.

Of course, now that I’ve seen Perl, I’m not so sure the quote is as true as it could have been. 🙂 Or perhaps Perl is combining, for me, the power and the legibility of machine code.

> [@](#):
>
> …everything is built on, BASIC begins to look like, well, BEZ.

Snort!

> [@](#):
>
> I’d rather start someone off on a language that they will move beyond, but won’t outgrow. Do you see the difference there?

Absolutely, I’m just not sure where that line lies (between what two languages, or types of languages) for the average novice programmer.

[Previous page](https://boards.straightdope.com/t/coding-languages/155833.md?page=2)
