Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Power of Language

Status
Not open for further replies.

CajunCenturion

Programmer
Mar 4, 2002
11,381
US
On the heels of the Power of RPG thread, I thought it might be fun for all of us to put in our two cents worth in discussing the means and metrics by which we determine just how powerful a language is.

I surmise that most people would agree that C++ is more powerful than VB. I would agree, and to support that claim, I would note the use of pointers and unions as a start.

So, just how to you rate the power of a language? Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Before you rate it you must define power in your context.

Is it more powerful for you to be able to control everything the processor does, or is it more powerful for you to have an application our the door tomorrow?

And so on...

-Rob
 
I think that one is pretty obvious, power in terms of programming can be determnined by a few factors:
How much control you have over the environment your programming in/for
The relative efficiency of the language your using as it relates to what your doing
The ease of use of structure of a language, ie syntatic similarity and good naming techniques

I do not believe cost or time are valid measurements of a languages "power" for anyone other than a manager who doesn't fully understand the more difficult language.

For example,
In the opinion of most programmers:
VBA is less powerful than VB
VB is less powerful than C/C++
My opinions:
-When it comes to recursion, I have never seen anything more powerful than Lisp (Note the "I" in that statement :) )
-Java has a very strong structure, but weak efficiency (without a lot of work and compiling it to native code, which kind of defeats the purpose)
-Perl is a very powerful scripting language, but I also consider VBScript to be relatively powerful
-Perl is weaker at Web Programming than PHP/ASP (not sure where I stand on JSP or CF) because it is less specialized and requires much more work for less result without any obvious advantages (perhaps an increase in speed, but not noticeable over the increase in clukcy coding).
-VB is a very weak language in that everything it does requires components built in C (or other powerful languages) and it is severaly limiting in what it will allow you to do.
-VB.Net is relatively strong in that it removed much of the weakness of VB by stealing functionality from Java


All in all, strength of a language is relative. What is string for me may not be strong for you, and my perception of programming structure may be more or less intuitive than yours.

Now that that is said, I go off to dop more VB programming (ick).

-Tarwn ________________________________________________
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Tarwn,

how could you leave Standard ML out of the equation!

-Rob

Wondering why he ever had to do anything with some of these languages...
 

Exactly. You dissapointed me.

ML is more powerful than LISP!!

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Remember, this is just for fun and for the sake of discussion - nothing personal intended

<Begin Devil's Advocate>

From Tarwn-->I think that one is pretty obvious, power in terms of programming can be determnined by a few factors: How much control you have over the environment your programming in/for. Based on that statement, the no programming language in a Windows environment is very powerfull because of the control that Windows takes away from you.

The relative efficiency of the language your using as it relates to what your doing - Is this a language issue, or a compiler issue, or are you not distinguishing between the two?

The ease of use of structure of a language, ie syntatic similarity and good naming techniques. If &quot;ease of use of structure&quot; means more powerful, couldn't that be interpreted as VB being more powerful than C++ - don't you thing VB is easier to use than C++. Syntactic similarity to what? and good naming techniques is rather subjective.

I do not believe cost or time are valid measurements of a languages &quot;power&quot; for anyone other than a manager who doesn't fully understand the more difficult language. What about the manager who does fully understand the more difficult languages (whatever that may be), and considers the &quot;power&quot; languages as those which lead to higher project profits? Doesn't RAD equate to power at some level?

VB is a very weak language in that everything it does requires components built in C (or other powerful languages) and it is severaly limiting in what it will allow you to do. Could it not be argued that VB is powerful because it has an open ended architecture which allows it to take advantage of external components regardless of what language they be written in? And just what are the severe limitations?

<End Devil's Advocate> Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Ok, :)
Environment: Whether or not Windows exposes much of itself to the programmer shouldn't be a major factor here, we aren't comparing C on a Solaris system to C on a Windows system. I was looking from the point of a programmer, can I write raw packets, can I bind to hardware, etc. Not necessarally environment code. I think the worst thing that has happened to programming is the requirement for hardware and the requirement for end users, without those two programming would be a lot easier ;)
Efficiency: I was aiming more at synctatic efficiency and general efficiency than at CPU cycles and such, otherwise we would be getting back into platform dependant versions of compilers and such. Efficiency without the hardware, is it possible to write efficient code that does not bring in a lot of unnecessary overhead or cause one to write code that looks like an octupus playing twister.
Structure: By syntatic similarity I meant that the syntax is similar throught the entire language. For example, after learning the basics of Java and spending a little time using the program I often can write programs using classes I have only heard of because the syntax is very regulare throughout the entire language, allowing me to assume that certain methods exist (and actually be correct). For simpler projects, yes VB might be easier to use than C++, but for anything approaching complex it is actually harder to write in VB than C++ because you spend most off your time atempting to force objects to do things they weren't designed for.
Good naming techniques was mostly a backup for the syntatic similarity poretion, which also didn't seem to work :) I meant good naming techniques in a general sense as in consistency, meaningful names, etc

Opinion: Well, ok, even more opinion :p
I view the phrase &quot;power of a programming language&quot; from a viewpoint of compiler-free and end-user free. English can be a moderately powerful language, but if we start comparing Modern English spoken in the US to Modern English spoken in China or Modern English spoken in the Fertile Crescent in pre-AD times, it becomes a very weak language. Therefore if we want to compare the power of languages we either need to compare them with as many specifics as possible, in their very best environment, or we need to compare them in general terms where environment is not a factor and use becomes the measuring stick.


Me Downing VB: The reason I see VB as a weak language is because beyond variable types and simple functions it rests entirely on the shoulders of these objects. I don't consider it to be an advantage that VB can use these objects, but a necessity and failing. In order to extend it's functionality you either need to hack at the objects that are included in the language or create new objects, either in VB (recursive argument, return to Me DOwning VB) or in a more powerful language.
VB is also severaly limited because it nearly depends on an IDE to work with (Yes I have written VB without the IDE, I am bitter, very bitter). VB, in my mind, is to dependant on other languages and lacks the ability to easily extend it's own functionality (keyword easily).

Standard ML: I leave this out because it falls under that clause &quot;I have never seen&quot;, that probably should have been clarified, I am still young and will never have the tim to play with everything I would like to play with, so while I don't feel qualified to define what the most powerful language in the universe is, I think I have picked up enough to get a general idea :)

I'll stop rambling now and return to work....with VB...someone please save me.
-Tarwn ________________________________________________
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Tarwn:
<sarcasm>
The &quot;i&quot; in &quot;lisp&quot;....that stands for &quot;irritating&quot;, right? As in &quot;lots of irritating superfluous parentheses&quot;
</sarcasm>

I posit that portability increases the power of a language. Since VB is only available on Win32, that decreases its overall power, doesn't it?

Want the best answers? Ask the best questions: TANSTAAFL!
 
Weeeellll, if we aren't considering environment to be part of the factor of the power of the language, than no that wouldn't count to the detriment of VB. I guess this is probably more specific to the individual than I originally suspected. I'm sure there are a lot of VB developers out there that will disagree on my distinct and complete lack of respect of it as a language and so I will help them out and disqualify that as a weakness for my own internal measuring stick...

...counting on fingers...L..I..Th...P...
I think you mispelled it....

Note to self: Cafeteria food bad, start bringing own lunch to work, cuts down on the flashing spots and swirling colors...

:p

-Tarwn ________________________________________________
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
In my eyes, the most powerful language is any form of assembly. It gives you control of minute details and can be (depending on program desing) the most efficient thing around.

That being said, it is usually way too much work to do a program of any real size in assembly. I have a program that I have codeveloped and maintained that is written in a proprietary language that is only a step away from assembly. This program looks like a text book when printed out. The thought of modifying it keeps me awake at night in a cold sweat.

I think C/C++ is a good balance of power, ease of use, and flexibility. However, when I want to throw a small utility together, I still often turn to my old QBASIC. (I also have a place in my heart for Pascal, but I haven't used it in many moons.)

I have used many of the languages being discussed, but not all. I think that the bulk of deciding which tool to use is programmer preference. A programmer who knows VB well, but only has an introduction to C++ will be able to get much more power out of the VB.

That's just my 2 cents.
 
&quot;Power of Language&quot;

As we can see even the definition is an &quot;opinion&quot;.

“Features” could be considered “power”. What I mean for instance is not having operator overloading as a feature in Java. To some they just seem like complication. “in the eye of the beholder”. To me that feature missing from Java does not stop me from using it but I don’t consider it an “equal” to C++.

“Environment” considerations. Garbage collection environments cannot compare to environments that provide memory management.

What about the subject that is NOT being discussed here. Some people are not suited, for whatever reason, to working with the more complex features of a language such as C++. If you want examples the two Tek-tips Visual C++ forums have been running rampant as of late with posts from user that have no idea what they are doing with C++. Similar posts can be found in the TT Java forums as well. Some developers cannot cope with managing memory, for them the garbage collection environments provide them with a way to be productive in the industry, for better or worse.

What has already been expressed is that languages are just tools and therefore, to a large degree are no better than the user wielding it… by far the larger concern.


“But, that’s just my opinion… I could be wrong.”
-pete
 
I agree that to rate the power of a language is very much based on personal opinion. For what their worth, here are some of my thoughts.

I do agree that control over the environment is a factor. By solely this metric, assembler is without question the most powerful, as you have almost complete control over the environment. You have all the rope you need. All of the Visual Languages (C++, VB, VFP, etc) have lost power in this respect because control over the environment has been taken out of the language and transferred into the OS. From a security standpoint alone, that is not necessarily a bad thing. Too much power can be harmful. At least you have a relatively easy to use API interface to access some of these lower level functions.

Another reasonable measure is tool set that the language makes available. The architecture of the Visual Suite makes all of these languages extrememly powerful in this regard in that they expose a huge toolset, an ever growing toolset as components can be added at will, and new components being manufactured by the development community on a daily basis. Some of them aren't worth a crap, that's true, but it's a powerful attribute of the language that provides you the option of using them. You don't have to reinvent the wheel.

I disagree that VB is weak due to its dependancy on underlying objects. By that arguement, you'd also have to say the Visual C++ is weak because it relies on the MFC (Microsoft Foundation Classes), and Borland C++ is weak because it relies on OWL (Ojbect Windows Library).

Take ADO for example. How many languages can use the ADO objects for Database Access. Is it a knock on the langugage because it relies on an ADO type object for Database Access. Or is it a plus because language povides the programmer a choice, you can use ADO, or RDO, or DAO, or whatever. I prefer to see this type of flexibility as element of a language's power in that it provides you alternatives rather than locking you into a specific.

Having programmed extensively in both VB and C++ (over 5 years each), the inherent power difference between the two languages is not that great. But C++ is definately more powerful as it exposes pointer handling to the programmer, and I like having the ability to use the union structure. Otherwise, there is nothing that I haven't been able to do in either language. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Cajun,

>> you'd also have to say the Visual C++ is weak because it
>> relies on the MFC (Microsoft Foundation Classes),

perhaps i'm mis-interpreting that statement but it just seems way wrong to me.

first Visual C++ is not a language. neither does it rely on MFC. I use non MFC Visual C++ projects all the time.

>> there is nothing that I haven't been able to do in
>> either language.

I've not used VB for over 5 years now so my experience would be prior to yours. I abandoned it quickly due to the fact that most of my time was spent trying to overcome the limitations of the environment.

Never seen anyone do VB development without using the environment. Conversly many people do C++ development without the Visual C++ environment. What does that mean?

-pete
 
From a security standpoint alone, that is not necessarily a bad thing. Too much power can be harmful.

This reminds me of the classic comparison of Windows and Unix. Windows is very frustrating because whenever you try to do something, it tries to do what it thinks you meant instead of what you said. Unix is very frustrating because whenever you try to do something, it tries to do what you said instead of what you meant.

Unix is a very powerful and useful OS, but I can only imagine what would happen if most of the people I know tried using it. (My mother has difficulty with her iMac sometimes.)

Getting back on topic, I agree that the pointer handling of C/C++ is a very powerful tool, but I have rarely used the union structure. Because you're using it more often, I'm curious how you are using it. What types of things are you doing with it? I think the last time I actually used it was when I was doing a project for a class where the project required unions.

This thread has turned into a very interesting discussion. Thanks for the pleasant diversion.
 
palbano, your point about Visual C++ not requiring the MFC is valid, and to be equally correct, Borland C++ does not require the OWL either.

The point that I was trying to make was that if you're going to downgrade a language based on how much of &quot;its power&quot; is only that which is intrinsic to the language, then you need to apply that standard across the board. The MFC is not intrinsic the Visual C++.

VB has evolved considerably in the past five years. Just as I cannot speak to the capabilities of RPG IV, because I have not used RPG since RPG II, it would be unfair to judge VB6 based on experience with VB3.

I've done VB development without the IDE. And although you've never seen me, you can no longer say that it can't or hasn't been done. It's not my favorite thing to do because the IDE makes the job a lot easier. The IDE has nothing to do with the inherent power of the language itself. You can build an entire web site using Notepad, or FrontPage, Dreamweaver, or insert your editor of choice. Again, that's not a function of the langugage (HTML, VBScript, PHP, etc), and at least IMHO, should be a factor in judging the power of the language. I use an electric screwdriver when I can because it makes the job easier. But it's the same screw, and its the same language.

KornGeek - In a similar vein, credit probably needs to go to Adm Grace Hopper who in an interview I believe in the mid 60's when asked what was the best thing about computers responded, They do exactly what I tell them do do, and what is the worst thing about computers? They do exactly what I tell them to do.

The last time that I used a union was in a database application, where the database was entirely user-defined. Consequently, database field types were not known until after the database had been opened. Using the Union structure greatly simplified the dealing with variable database field typing. It is also comes in handy when doing arithmetic operations, when only a run time do you know the precision of the numeric types being used. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
>> it would be unfair to judge VB6 based on experience with VB3.

yes that is true. Also your defense of VB is admirable and i have no problem with the fact that it is adored by many users.

Attempting to compare it to C++ seems somewhat desperate. I will not attempt to create a complete list of features lacking in VB6 but for example: it lacks fundamental OOP features like inheritance, overloading and polymorphism, it lacks mult-threading capability… etc.

Now i understand VB.NET is a major advancement of the language and probably puts in on a par with C#. So now it's a much more powerful language that operates in a garbage collected environment. So it still is not comparable to C++.

-pete
 
I'm not attempting to defend VB by any means. Nor am I trying to denigrate it. Its simply an objective evaluation of the relative power of the languages. You are quite correct, VB is not an Object Oriented Language, whereas C++ certainly is. As I stated in an earlier post, I clearly stated But C++ is definately more powerful. But I stated that the difference is not as large as some people make it out to be.

I'm not sure what you mean by a &quot;garbaged collected environment&quot;. Perhaps you could explain that. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Garbage collection definition found on the net, please note that in the &quot;why it is good&quot; section there is no mention of effeciency, instead it basically takes control away from the developer which is why it is considerd &quot;GOOD&quot;. Kind of hard to argue that point! LOL

What is garbage collection?

Garbage collection is a part of a language's runtime system, or an add-on library, perhaps assisted by the compiler, the hardware, the OS, or any combination of the three, that automatically determines what memory a program is no longer using, and recycles it for other use. It is also known as ``automatic storage (or memory) reclamation''.

Why is it good?

Manual memory management is (programmer-)time consuming, and error prone. Most programs still contain leaks. This is all doubly true with programs using exception-handling and/or threads.
A second benefit of garbage collection, less obvious to people who haven't used it, is that relying on garbage collection to manage memory simplifies the interfaces between components (subroutines, libraries, modules, classes) that no longer need expose memory management details (&quot;who is responsible for recycling this memory&quot;).

 
Pete-
I sometimes prefer using languages that handle garbage collection for me. Especially when I'm cobbling together a tool for my own personl use, I want development time to be minimal, and a slight blow to efficiency of the code is well worth it.

When examining the power of a language, you can't ignore development time. For quick development, (for me at least) one of the flavors of Basic beats the C languages. For sheer power, assembly beats C (and everything else), but is much more time consuming. The C languages are a nice balance between the two. To truly compare these languages, you have to consider all of the reasons a language could be considered powerful.
 
There has been discussion of development &quot;time&quot; being considered. I won't debate the question of &quot;time&quot; being a definition of &quot;power&quot;.

In my office we have ruled out using Java for desktop development due to installation/support issues. Anyone that has done the CLASSPATH DEVIL DANCE knows what i'm talking about LOL. So we love using it for server development.

We have done a lot of Java inter-process socket based multi-threaded applications for server side development and have not had any performance problems with the GC. Keep in mind our software doesn’t run the Space Shuttle.

-pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top