Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 28th, 2005, 6:38 PM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,886
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
High-level? Low-level?

I don't get it. I hear C++ referred to as "low-level" and Python as "high-level".

What is this all about?
Sane is online now   Reply With Quote
Old Sep 28th, 2005, 6:43 PM   #2
Benoit
Expert Programmer
 
Benoit's Avatar
 
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 555
Rep Power: 5 Benoit is on a distinguished road
Low-level is closer to the hardware, assembly is lowest level
__________________
Johnny was a chemist's son but Johnny is no more, for what Johnny thought was H2O was H2SO4
Benoit is offline   Reply With Quote
Old Sep 28th, 2005, 7:46 PM   #3
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
Things like type inferencing, memory management, automated structuring, arrays, functions; these are all aspects of a given language that can also help classify it as high- or low-level.

Note php, a high-level language's loose type structure:
$myString = "Hello, World!";
$myInteger = 459;
$myRealNum = 332.23;
Versus, say, C++'s strict type structuring:
char[13] = "Hello, World!";
int myInteger = 459;
float myRealNum = 332.23;
That is just one of many differences. C++ in this case is comparatively low-level, though in general C++ is seen as a middle- or higher-level language.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Old Sep 29th, 2005, 6:07 AM   #4
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,886
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Ah... got it. Thanks.
Sane is online now   Reply With Quote
Old Sep 29th, 2005, 7:34 AM   #5
ChiHappens
Programmer
 
ChiHappens's Avatar
 
Join Date: Sep 2005
Location: Brevard, NC
Posts: 35
Rep Power: 0 ChiHappens is an unknown quantity at this point
Send a message via MSN to ChiHappens
hmm its funny since java and other scripting languages have come about, C++ has moved from High level to low? I don't think so. C++ is at its most mundane and non oop coding a mid-level language. I think low-level is reserved for ASM and maybe PL1. But I guess it's a lonely world at that level, so we lump C++ there.

If you see some elegant oop code in C++, the abstraction can NOT be considered low. Hell it might even be high.

See it's all how you approach the definition of "level"

If you approach it from the point of view of Writability, then the lower the level, the less like english (or INSERT YOUR LANGUAGE HERE).

If you approach it from the point of Hardware Abstraction, then the lower the level, the less abstraction.

So its debatable.

The only thing I know is VB6 and COBOL should be in a level of their own. (grr can you tell I have had to build VB6 controls for COBOL the last few days...I miss C#)

Later,
Chi
__________________
http://www.starshipcombatsimulator.com
They mostly come at night...mostly.
ChiHappens is offline   Reply With Quote
Old Sep 29th, 2005, 7:54 AM   #6
ChiHappens
Programmer
 
ChiHappens's Avatar
 
Join Date: Sep 2005
Location: Brevard, NC
Posts: 35
Rep Power: 0 ChiHappens is an unknown quantity at this point
Send a message via MSN to ChiHappens
A colleague just came into my office and set me straight. C++ can be considered a low-level language if you consider all the hardware abilities of a language, meaning that in C++ you can use pointers and pointer math as well as low-level api calls (os specific) and finally he points out:

"C++ will compile inline Assembly code...how much lower do you want? binary?"

I humbly accept C++ is low-level,
Chi
__________________
http://www.starshipcombatsimulator.com
They mostly come at night...mostly.
ChiHappens is offline   Reply With Quote
Old Sep 30th, 2005, 3:02 AM   #7
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
i think c++'s ability to accept inline code written in a different language has nothing to do with c++'s "level". yeah, you can add asm. that's not c++. that's c++ with asm added to it. i can say "me want food" instead of saying "i'm currently feeling rather famished". that doesn't mean anything...it's an added feature. i've heard SQL referred to as a fourth-level language because of the high level of abstraction involved in that particular "language". you can nitpick on terminology all day, that doesn't really change anything. i can say that the sky is "warflle" instead of blue...no connection whatsoever.

the idea is that "high" level languages allow the programmer to type code in pseudo-english, rather than by moving bits hither and anon. just because you can STILL DO the low-level stuff, doesn't make it low-level. it's only appropriate that a high-level language inherit the low-level capabilities of it's predecessors.

you do lose things with languages like python...like an automatic transmission, sure it's easier, but you have a lot more control (and speed) with a good 'ole stick-shift.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Sep 30th, 2005, 3:55 AM   #8
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by bl00dninja
you do lose things with languages like python...like an automatic transmission, sure it's easier, but you have a lot more control (and speed) with a good 'ole stick-shift.
Higher level languages, such as Python, give the user more power per instruction. Whilst your analogy is somewhat accurate, given that you lose the control over memory management and basic instruction in higher level programming, but offsetting this disadvantage is the fact that higher level languages give users language constructs that do not exist in lower level languages.

For instance, in Python I have metaclasses, introspection and higher level functions, features which do not exist in C++. Nor do I believe it is possible to recreate such functionality in C++ without floating a new language on top of C++ (which rather defeats the point).

My simile of choice would be to compare higher-level languages to a power-saw, and a lower level language to a hand-saw.
Arevos is offline   Reply With Quote
Old Sep 30th, 2005, 3:57 AM   #9
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by iignotus
Note php, a high-level language's loose type structure:
$myString = "Hello, World!";
$myInteger = 459;
$myRealNum = 332.23;
Higher level languages don't have to be weakly or dynamically typed. There are many high level languages that have strong static typing.
Arevos is offline   Reply With Quote
Old Sep 30th, 2005, 4:53 AM   #10
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
C++ is the lowest level object oriented programming language, but not really a low level language. A mid-level language, I would say.
Polyphemus_ is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:05 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC