![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() |
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? ![]() |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 555
Rep Power: 5
![]() |
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 |
|
|
|
|
|
#3 |
|
Professional Programmer
|
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; char[13] = "Hello, World!"; int myInteger = 459; float myRealNum = 332.23;
__________________
% 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;} |
|
|
|
|
|
#4 |
|
Programming Guru
![]() |
Ah... got it. Thanks.
|
|
|
|
|
|
#5 |
|
Programmer
|
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 |
|
|
|
|
|
#6 |
|
Programmer
|
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 |
|
|
|
|
|
#7 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#8 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
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. |
|
|
|
|
|
|
#9 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
|
|
|
|
|
|
|
#10 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
C++ is the lowest level object oriented programming language, but not really a low level language. A mid-level language, I would say.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|