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
 
it basically takes control away from the developer which is why it is considerd "GOOD". Kind of hard to argue that point!

I am NOT argueing the merits of automated garbage collection. The benefits are certainly plain to see.

However, those benefits are not without a price. I would argue that taking control away from developer is not always good. I have no problem turning over control of some things at times for the system to handle. But the decision to relinquish control and/or to rely on the system to do its job for me should be my decision, and not arbitrarily thrust down my throat. The language that gives me the choice, provides me more power. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Cajun wrote:

Kind of hard to argue that point!

could have sworn i put a LOL after that... oh i did. Cajun, you maybe missed that?

-pete
 
No I didn't miss it. I just didn't make any sense since in the previous two posts you stated

"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." That statement clearly establishes, at least to me, that you believe a language that operates in the garbage collection environment is a more powerful language. You follow that up in your next post with why the garbage collection is good. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
ah the pitfalls of text messaging.

nope i goofed you up, i don't consider GC to add "power"

VB.NET is more powerful than VB6 due to features not GC. i meant that even with the encreased power it still runs in a GC environment thereby limiting it to a arguable degree.

sorry for the confusion.

-pete
 
ok it's official i am an idiot LOL

As far as GC is concerned i would say that a language/runtime environment that allows you to use GC but does not force you to use GC provides more "power" to the developer than the language/runtime environment that takes the choice away from the developer by forcing GC on him/her/them.

That does not imply that GC is a "bad" thing. I am sceptical as to the perfomance of GC based on my limited exposure to it. In theory GC is cabable of the same performace as standard memory management such as malloc/free etc. since it does almost the exact same thing anyway. I just don't believe that i have seen a GC implementation that has achieved a superior performance rating yet.

Note that my comment about using Java and it's GC in our projects contains a disclaimer regarding the efficiency requirements in our projects.

>> Keep in mind our software doesn’t run the Space Shuttle.

In my final comment on this thread ( everyone hopes LOL), i remind you all that i never claimed any level of competence in authoring forum posts... and after this i never will.

Thank you all for you patience with me.

-pete
 
Sorry I am late in clarifying the "rely" wording that came into question earlier, haven't been on much the last couple days.

Basically my issue here is that while some languages use prefrabicated components designed in other languages (which is by no means a weakness) VB relies on, ie can't do without, these objects. For example, throwing together a GUI in VB is as easy as drag and drop, but when it comes to making that GUI look or feel differantly than the standard look and feel it gets increasingly harder the more different your trying to make it look, whereas in other languages you would generally have more control over the feel without sacrificing as much time/patience when it came to creating or changing the interface.

As to the VB language in general, I have a fairly good grasp of VBScript and understand that an individuals knowledge of a language has a lot to do with how much/quickly/well an idea can be executed. Along the same vein, though, I understand how some languages do to much for the user, allowing the user to program in ignorance of what they are actually doing, opening security and efficiency holes all throughout their system.

For example, it is commonly said that PHP is a much better language than ASP. Generally I agree with some of the specifics such as speed and so on, but also like to make the comment that there are two different user groups involved. I have listened in to a lot of what has been said in the PHP forum (and of course actively participate in the ASP forum) PHP gets a much lower percentage of less knowledgeable users. Generally speaking there is a better chance that someone trying to pick up PHP already knows at leats one other language. Not the case with ASP, where the magic words of World Wide Web meet the magic business word of Microsoft. Since PHP has many more users that think more in depth about a language, they have a much richer development group behind it, pushing the boundaries and developing new and better ways to do things. ASP has a lot of people(by no means all, but a good percentage) that expect everything to happen for them and think that successful execution of a for loop allows one to list a language on their resume.

So while I can do some relatively powerful things in ASP, the average skill level of users for this language is lower than the average skill level of the PHP users and thus I find myself being looked down on by certain PHP users who believe that the rawest recruit in PHP can outperform an expert in ASP. The point here is that some languages have undiscovered potential, and that measuring the power of a language is something that I have decided I cannot do on anything but an individual basis :p

BTW, I use ASP as my example becuse I am somewhat known around here in that area,
as it's one of the few things I don't do at work, which is why the C, VB, Java and database forums don't hold my attention (I mean, c'mon, I just did that for the last 10 hours, I need a change of pace when I get on :) )

Let me know if anyone catches my point, i think I got lost in thre somewhere down a sietrail...

-Tarwn ________________________________________________
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Let me sum up for ya Tarwn...

don't judge the power of a language by it's most common applications, we got alota morons who program when a language gets too easy or popular to use.

:-D

Oh, and about the VB stuff, I think you made that point quite clearly.

-Rob
 
Tarwin and Rob [2thumbsup]

darn, is that considered a comment? I feel a red flag coming LOL

-pete
 
I think Tarwn is on to something. When judging the applicability of a language to a task, it is necessary to keep in mind what the developers of the language had in mind when they created it. This can give you a 3000-meter view of the limitations of the language and thus give you a picture of how much you might have to fight to make the language to make it do something the developers never had in mind.

Most Mi¢ro$oft software has this feature in spades -- the programmers have very specific ideas of how you will use the software. Use the software the way the developers imagined, and you have an easy time of it. Use the software in a way the developers did not imagine, and you will have an uphill battle on your hands.

And though M$ is in my book the worst offender, every language has this bias in it.


Another problem is the old adage, "If the only tool you have is a hammer, it is amazing how many problems look like nails." I see every so often someone looking for a Pascal compiler for Linux. It's the only language the guy ever learned, and he either does not know enough to teach himself another, or he isn't interested in learning another. The problem with Pascal is that the developer intended that the language be used as a teaching language, so it has been deliberately limited in what you can do and how you can do it. When a programmer knows only one language, he will from time to time spend many man-hours fighting the language to make it do something that another language would do easily for him. Want the best answers? Ask the best questions: TANSTAAFL!
 
Ahhh... Pascal. I have fond memories of that language. It definitely is not the most powerful (although I would argue it is the best first language to teach someone). However, for me it has been the most fun to program in.
 
Best first language?! No way, give me logo to teach a kid anyday ;).

Seriously, until a year or two ago I would've definately agreed with you. But these new loosely typed languages like Python and PHP are shaking my confidence. For training a hardcore programmer in a tech school I probably still agree. But for getting someone off the ground, making real programs within a few weeks, focusing on algorithms instead of syntax, etc... I think there's a good chance I'd start with one of those.

This is actually something I'm interested in persuing as a conversation as if I ever find free time I've considered offering a summer tutorial type thing at a local school which doesn't have adequate computer offerings... so please let me know all your opinions.

-Rob
 
Rob,
Logo!?! I'd almost forgotten about that. I used it as a drawing tool, but never as a language to actually create programs. By the way, skiflyer, kids these days are probably already coding in C++ anyways. They would be bored with logo.

As far as the tutorial idea, I think that is a great idea. The world could use a few more people helping to teach those who want to learn. I'm not familiar with Python or PHP, so I can't comment on those, but Pascal can help students learn about procedures (or subs), functions, arrays, pointers, etc. I learned almost all of the basic data structures in my 2 years of high school programming classes using pascal. Pascal is a great teaching language. However, these new languages may be better. I don't know 'em yet. There's my 2 cents.
 
It would be important, even in a production-centric learning environment, to make sure that core theoretical topics are covered: data structures, structured programming, good programming style.


LOGO is good for what is is designed to do -- give a young student the basic core ideas of programming. Things like ordered instruction execution, looping, and variables.

To be honest, you can teach some of that without ever resorting to the use of a computer at all. I had some discussions with a college professor of mine about an idea for teaching that most basic core skill of programming: the analysis of a task and the breakdown of that task into discrete steps.

I stole the idea from a leadership exercise used at the U.S. Naval Academy (and probably other academies, too). A midshipman is given a task that he must order a classmate to perform. Each student trades off, fulfilling the role of the command-giver once and the role of command-performer once. Each student gets two grades on the excercise: one on how well he was able to command his classmate, and one on how good he was at screwing up the orders when he was taking command.

Have all your students write down ahead of time the instructions necessary to make something simple, like a peanut butter and jelly sandwich. Bring the ingredients to class and call up the students one at at time. Have each student create the sandwich using another student's instructions. Each student gets two grades: one on how successful his "program" was, and another on how good he was at messing up when strictly performing someone else's instructions while acting as the "computer". The "programmer" has to eat the sandwich.

My professor and I figured that if the exercise was handled right, it would be a good introduction to programming task analysis, formal programming languages (as opposed to trying to do it in English), and the often sheer perversity possible in complilers and interpreters. I don't think the idea was ever used: she ended up at another school before she ever got a chance to try the exercise.

Once you have exposed your students to the idea of task analysis, then you have your foot in the door for moving from English instructions to computer language instructions. Want the best answers? Ask the best questions: TANSTAAFL!
 
Ok, first off I was joking about LOGO, I think it's a great language and was a lot of fun... just fond memories :)

I totally agree with your comments sleipnir, in fact the local news in Chicago ran a story of a classroom implementing that identical experiment (peanut butter and jelly sandwiches) a year or two ago... made for some amusing video.

I've always thought it would be a great first day excercise.

But what I mean about languages like Python & PHP is getting past some of the hardships so they can do something interesting.

For example, even in my last couple years of college I had professors implement this.

One class we had to write a compiler, but we only had 10 weeks because we worked on the quarter system. So the teacher used python as the language of choice, he had used C in the past, but found it was a waste of his time often because students would have incredible frustration getting to the interesting parts of the compiler methodology as they were stuck on pushing bits, page faults, massive structures written to create the necessary trees...

Basically lots of learning of C and C++, but not enough learning of the focus of the class.

-Rob
 
When I took compilers, it was a Fall semester, which was only 12 weeks. We were required to implement a compiler in c -- but we were allowed to use flex and bison on that final project. We did have 5-6 other interim programming assigments, too, though: standalone recursive descent parsers, etc. I remember I dropped differential equations that semester to have more time for the compilers project.

It may be that your instructor got too ambitious with the language you were implementing. I remember my professor had us implement a pedagogical construct she called c--, which was a subset of c-language. Want the best answers? Ask the best questions: TANSTAAFL!
 
Ah, see we had to write our own flex and bison equivalents... and I think you're write about the ambitious part... he was frustrated in past quarters wasting time with the details, and wanted to get to the meat. It resulted in slower compilers of course, but I walked out feeling I could re-implement a more efficient compiler in C using the one I had as pseudo-code basically.

And it's not to say it couldn't be done in 10 weeks with C... but like you said, you dropped DiffEq to have more time, many of us have similar stories from OS, and it was such a nice relief when Compilers was more manageable.

This was an experiment of his, he'd always used C in the past, I'll have to ask him if he considered it a success or failure and what he's using now. Of course he's a little biased being that he's behind the Swig project in a big way, and wrote the Python reference book we used for the class ;).

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top