Sign in to follow this  
Followers 0
gravitar

What makes a programing language a programming language?

5 posts in this topic

How do you define it? What sets apart a language from a mere list of configuration parameters? What made me think of this is the CNC programming classes I'm taking. I'm in the "advanced mill" class now, and the current topic is the Haas MACRO command language. Which by the way, according to the user manual, is an optional feature. So not all mills ship with this capability. What it allows you to do is silly, frivolous stuff like branching, conditional execution, variables, constants, indirect addressing, and evaluation of mathematical expressions. It has the look and feel of a BASIC written for a very compact/primitive environment. So in other words, WITHOUT this stuff, what have you got? I guess I was happy with simple position statements and the built-in "canned cycles", but now I'm starting to feel like that was something less than programming. And let me reiterate, this is the ADVANCED class. Most CNC programmers (is it still correct to call them programmers?) don't use or learn this stuff. They just make a list of tool movements and let 'er rip.

Share this post


Link to post
Share on other sites
You are programming. Don't let any body tell you otherwise. I just doubt the usefulness of the Haas macros.

Share this post


Link to post
Share on other sites
Lets refer to old Webster: Program - a sequence of coded instructions that can be inserted into a mechanism (as a computer) from this link Language - the words, their pronunciation, and the methods of combining them used and understood by a community and/or a formal system of signs and symbols (as FORTRAN or a calculus in logic) including rules for the formation and transformation of admissible expressions from this link So a programming language must be a set of instructions for a mechanism, used and understood by a community of persons. Using this definition CNC is a programming language.

Share this post


Link to post
Share on other sites
You could really call almost anything a "programming language" if it lets you change the sequence of how a many operates. Even a selector switch would count. That being said, in the computer world, there is a term called "Turing complete". Any language that can be used to implement all the equivalent operations in a simplified machine called a Turing machine is called Turing complete. You can google this term or look it up on Wikipedia for a good explanation. All general purpose languages and a lot of the specialized ones fall into this category. It is frequently used as an acid test to separate "real" programming languages from configuration files.

Share this post


Link to post
Share on other sites
warning: This post does get into the weeds a bit... It's been awhile since my theory of computation class so I'd appreciate help/corrections :) A Turing Machine can implement any computable/decidable problem (ugh, problem that can be solved with a Turing machine. Many equivalent or weaker models have been introduced, but none stronger. See Halting Problem for an undecidable problem) that any programming language can, but the inverse isn't true. A programming language need not be Turing Complete, like Bloop. A Turing machine is a theoretical mathematical model usually expressed in set notation that basically has a read/write head and an infinite tape. When comparing computing capabilities, you get into languages that the machines can accept. Here's what comes up in order of flexibility: 1. DFA (deterministic finite automata) are state machines that accept only accept regular languages. 2. NFA (non-deterministic finite automata) add various languages to the mix. 2a. PDA (pushdown automata) have an infinite stack and accept context-free languages ..... Turing machine. You can knock yourself out with the details on Wikipedia. Computer scientists and mathematicians go crazy proving that seemingly different models are really equivalent. I'd venture a guess that any language that can represent those modeled by an NFA and "above" is probably a "programming language". It's also easy to tell based on typical qualities. Does it have: syntax, compiler or interpreter, usually has at least loose data types, functions/operators, can take input, process data, and output something. The most direct is to go by wikipedias basic definition. To answer your question - CNC is a de-facto programming language. Paul's right that by another definition (Turing complete programming language) it may or may not be - my guess is yes - if it has goto's or infinite looping it probably is. The way that I usually look at this question informally is what can you do with it. I'd say C, Java, .NET, and assembly are "more of a programming language" than scripting languages like LISP, perl, JavaScript, which are more than macros, which are more than expressions. The latter may be argued either way - I have no idea. The point is, the more it's like tinker toys the less likely it will be regarded as a "programming language", although, by definition, if you're asking if it's a programming language - it probably is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0