The State of the Scripting Universe 131
r.jimenezz writes "Via PragDave's blog I learned of an article by Lynn Greiner on the state of scripting languages, a.k.a. scripting dynamic languages. A number of influential personalities (Guido von Rossum, Damien Conway, PragDave himself and others) were interviewed and it's interesting to see how much their opinions coincide despite being interviewed separately. A lengthy but worthwhile reading."
Dun dun dun... (Score:5, Funny)
The Number of the Devil of Programmers.. looks like it's as I always said, scripting languages are evil..
Re:Dun dun dun... (Score:3, Funny)
Re:Dun dun dun... (Score:1)
Re:Dun dun dun... (Score:3, Funny)
Gosh I really need some sensitivity training or something.
Humor Impaired (Score:1, Offtopic)
What defines a scripting language? (Score:4, Interesting)
The best I can come up with is that a scripting language is an interpreted language that is normally attached to an application in order to allow the end user to automate functions within that app. So for example BASH programming is "scripting" since most of what you do is items that would normally be done at the command line. Same with Word/Excel macros. Also, TCL was designed to be attached to other programs (although the typical use is stand-alone). But I wouldn't put PERL in that catagory, anymore than GW-Basic or interpreted Pascal are scripting languages.
So, what does a language need to be called a "real" language, other than being compiled?
Re:What defines a scripting language? (Score:3, Insightful)
I'm not trying to be a wise-ass. I'm sincere here. Maybe a ratified standard by some authority is what sets COBOL, BASIC, and Ada apart from their more agile scripting counterparts, whether or not a compiler or interpreter implimentation exists.
Re:What defines a scripting language? (Score:2)
Re:What defines a scripting language? (Score:1, Redundant)
Re:What defines a scripting language? (Score:2)
Re:What defines a scripting language? (Score:3, Insightful)
Re:What defines a scripting language? (Score:1)
For example, back in the day your could run from a DOS command promt "gwbasic mycode.bas".
Or are your refering to the ability to put for example "#!/bin/perl" at the top of a script and run the script directly? Because the that is a function of the OS, not the language (i.e, if gwbasic was available for unix y
Re:What defines a scripting language? (Score:2)
I like it!
Re:What defines a scripting language? (Score:3, Informative)
If you have file with "#!/bin/perl" at the top it is still a text file if you run it directly.
Doesn't matter how you call it, it is still a text file.
Yes, PERL is a scripting language.
Re:What defines a scripting language? (Score:2, Insightful)
Of course, some will argue that Basic is a scripting language (or not a language at all), but I won't go there
Also, even though Pascal is usually compiled, it used to exist primarily as an interpreted language.
I do agree that Perl is a scripting language, I just can't figure out why (since a perl script doesn't interact "control" another program), wherea
Re:What defines a scripting language? (Score:1)
There's even a project out there to run C code as a script. In that case, it would be a script written in C. A script is a text file, a program is a compiled file, that's all there is to it.
Re:What defines a scripting language? (Score:2)
Re:What defines a scripting language? (Score:4, Insightful)
Let's assume you are talking about Visual Basic. Yes, like Java, Visual Basic requires a runtime engine to execute. However, C++ and C require calls to the operating system. Try running a C++ program without an operating system and see how well it works. So in reality all progamming languages really require an "interperter" to execute. Maybe OS kernel code is the only real stand alone code.
Re:What defines a scripting language? (Score:3, Informative)
Re:What defines a scripting language? (Score:2)
Re:What defines a scripting language? (Score:1)
Re:What defines a scripting language? (Score:2)
I would have to disagree. Most people would consider the old DOS BASIC scripting.
Re:What defines a scripting language? (Score:3, Insightful)
I think languages were traditionally classified as "scripting" when their primary use was to control the execution of other executables. A point made by all of the folks in the interview is that languages such as perl, python, and ruby have developed well beyond that to the point where they can compete head-to-head with C, C#, Java, etc. In other words, trying to categorize languages as either "scripti
Re:What defines a scripting language? (Score:2)
I agree completely.
In fact, I have never considered Python or Ruby to be scripting languages at all; rather, they are interpreted languages, which is something quite orthogonal to being a scripting language.
Simlarly, languages like awk are not scripting languages.
Perl is somewhere in between.
The one thing that I would add to your definition is that a scripting language is interp
Re:What defines a scripting language? (Score:2)
Re: Perl - Is it a scripting language or not? (Score:2)
I wrote that without really thinking too much.
Modern Perl is probably not a scripting language, but I'm not familiar enough with it to say so for sure.
However, the last time that I gave Perl more than a cursory look (in the last millenium), it was using UNIX commands (executables) to implement many of its operators.
For example, I think that it used expr to do RE matching, mv to rename files, etc.
Perl hid the use of (many of) these commands from the user.
Tha
MANLY scripting language? (Score:3, Funny)
Yes, but BASH is a manly scripting language, where as...
Re:What defines a scripting language? (Score:4, Informative)
by the interpreter.
Hobbs refers the interview reader to a whitepaper which defines scripting languages as follows:
"There is a category of programming languages which share the properties of being high-level, dynamically typed and open source. These languages have been referred to in the past by some
as "scripting languages," and by others as "general-purpose programming languages". Neither moniker accurately represents the true strengths of these languages. We propose the term dynamic languages as a compact term which evokes both the technical strengths of the languages and the social strengths of their communities of contributors and users."
One statement that Pall makes is great: "As more programming is done with scripting languages, doing memory management yourself, or implementing yet another LZW-based compression library will be seen as a risky proposition when deadlines approach."
I totally agree with this; given that an interpreter manages memory decently, why reinvent the wheel? It is like building your own spark plugs from scratch when you want to do a tune up on your car.
Re:What defines a scripting language? (Score:2)
I don't want to dispute your point, as it does make sense. But it suddenly dawned on me that this particular memory management argument is being brought up so much that it's becoming sterile. To take your car analogy one step further, imagine that certain transmission advocates had been continually arguing for two decades that "given that automatic transmissions prevent the grinding of gears, why use a stick shift?"
Or let's use are
Re:What defines a scripting language? (Score:3, Insightful)
This is cool, the article author just eliminated one very commonly used scripting language by require it to be open source : Visual Basic.
Many widely used Microsoft applications has a scripting interface via Automation, and guess what, you can use Visual Basic for this! In gen
You dont use a sledge hammer to open your penuts (Score:5, Insightful)
As a sysadmin most of my Programming is done in either ruby(im difrent) , shell(bash or ksh) or perl. Using C for most of the things i have to automate is as i said "Taking a sledge hammer to a penut" , It would be total overkill and waste my time and the systems and it would be more error prone
Scripting will always be an important part of my work , and with the increasing power and decresing price of computer equipment over the last few years , it has become viable to program many many things in languages such as python , things which would not so long ago, would have requierd the power of C/++.
Scripting is in a fine state , and will continue to fill its end of the market , just as compiled languages will always have their place
Re:You dont use a sledge hammer to open your penut (Score:3, Informative)
I think the way of the future is static languages like C for critical stuff, and dynami
Re:You dont use a sledge hammer to open your penut (Score:2)
Re:You dont use a sledge hammer to open your penut (Score:1)
APL -- serious number crunching is the only reason people use it.
PIK (Ok, it's a whole environtment, not just an interpreter) -- Lots of record crunching gets done by PIK systems.
Re:You dont use a sledge hammer to open your penut (Score:2)
Re:You dont use a sledge hammer to open your penut (Score:1)
Re:You dont use a sledge hammer to open your penut (Score:2)
Re:You dont use a sledge hammer to open your penut (Score:2)
Re:You dont use a sledge hammer to open your penut (Score:2)
C structs will probably always be lighter weight than objects
In C++, if a class has no virtual functions, there's no reason it can't have exactly the same memory footprint as a C POD struct. Member function calls should similarly incur no additional overhead vs. a C function call. That's the underlying philosophy behind C++ with regard to C - you only incur penalties for things (like virtual function indirection, exceptions, etc.) if you actually use them in your code.
Re:You dont use a sledge hammer to open your penut (Score:2)
If I'd been somewhat biased, I could've spent a lot of time banging my head trying to figure out how to use the Ruby version, but instead, in this instance, went to something that I found simpler and quicker to
Another cool article about Tcl (Score:5, Informative)
http://www.devsource.com/article2/0,1759,1778148,
talks about some of the cool stuff that Tcl does. My favorite thing about the language is that it hits a real sweet spot with its level of abstraction. Python has an event loop now, in Twisted, but Tcl's had the same thing for ages, and it's very easy to use.
Re:Another cool article about Tcl (Score:1, Funny)
Re:Another cool article about Tcl (Score:1, Redundant)
Here is an example of one of Stallman's critiques of TCL. Not sure if it is still valid or not but it isn't some nonsense issues
Tcl also has some serious des
Re:Another cool article about Tcl (Score:2)
Easy to start. Hard to debug and maintain. I'm forced to use and repair a PBH's idea of an ideal app daily...and I don't have time to get rid of it by re-doing it in Java or Python. I estimate that about 1/4 of my day is shot because of this monster.
The reason why the PBH dictated TCL? He's a TCL wiz! The initial developer wasn't; he was a manager. The specialists mainta
Developer productivity vs. CPU productivity (Score:5, Insightful)
Given the low-cost of fast CPUs and high-cost of programmers, I'd rather waste CPU cycles than waste developer labor.
Re:Developer productivity vs. CPU productivity (Score:2)
Re:Developer productivity vs. CPU productivity (Score:1)
Re:Developer productivity vs. CPU productivity (Score:2)
Experience of a newbie... (Score:3, Informative)
I have a final project in my computer engineering diploma in which we are trying to monitor and control a few security devices over the web. The focus is about split equally between design of a PCB w/ microcontroller and getting the code written. Since my only formal training was in C, and at first I considered using C for the majority of the programming. However after some research I stumbled upon scripting languages.
The result is that instead of a cumbersome 1000 line C program which would be a huge time sink, I have several small C programs connected with script. I'm using a combination of Bash script, PERL, and Java. I had to learn the basics of each but in the end that was faster and easy to debug. The time I saved went into more hardware hacking and making sure that the electronics portion worked better. In the end it made for a project that was much more fun.
Re:Experience of a newbie... (Score:3, Insightful)
"Right tool for the job" is an important motif for efficent workmanship
Lost. But than I'm stupid. (Score:2)
Re:Lost. But than I'm stupid. (Score:3, Informative)
Re:Lost. But than I'm stupid. (Score:1)
Re:Lost. But than I'm stupid. (Score:3, Informative)
Dan Bernstein [cr.yp.to] is a proponent of this approach, as can be seen by looking at the approach taken in his programs such as Qmail [cachefly.net].
Re:Lost. But than I'm stupid. (Score:1)
For what the original poster outlined, I'm certain that's the case.
The core idea is "modular programming". There are a whole raft of advantages. And a large body thinking to support it.
UN*X is built on this idea. Typical development cycle (see "the unix programming environment)...
1) mock it up in shell
2) redo it
3) Use C to spe
One language to bind them . . . (Score:2)
Why don't we write the whole thing in C? Well, the shell allows us to write quickly and hack around while the C approach has an edit-compile-link-test loop. Why don't we write the whole thing in shell or Perl or whatever? Because we need to optimize the slow parts.
So a
Single file interpreter (Score:1)
Re:Single file interpreter (Score:2)
AllInOneRuby (Score:2, Informative)
AllInOneRuby [erikveen.dds.nl] uses the same technique to package the Ruby interpreter and core and standard libraries into a single
I'm not sure if Perl and Python have something similar.
Re:Single file interpreter (Score:1)
Centum (Score:2)
Re:Centum (Score:1, Insightful)
Re:Centum (Score:2)
Yeah like VB that is waaay cross platform. Besides all projects start on one platform. If you care why dont you stop bitching and pitch in and help us port it.
Re:Centum (Score:2)
And fix the rendering of the homepage in Firefox while you're at it.
I hate dynamic languages (Score:5, Interesting)
Lets say you have to added a feature to the following function:
updateCustomerAccount( customer, newInfo )
Looks nice, with very descriptive function name and parameters. But it isn't. Is customer a string name, a an accountId, or a data structure? Does it return anything (success or failure code)? And a little more debatable, does it throw any errors.
The usual cases are:
But even if you can always rely on one of these solutions, you're missing out on the beauty of statically typed languages: IDEs. By formally typing objects in the language grammar, you have not just documented your code to your peers, but to the machine itself. And allowing the machine to reason about your code means it can help you write it. It keeps you in the code, with instant access to API, documentation, and refactoring. Now you have mentally stepped beyond the code into the problem space.
Anyone who has written Java in a solid IDE like Eclipse can atest to this. I've had I've had people look over my shoulder in amazement as "the computer writes [my] code" for me. Every function appropriate to the context (and their documentation) usually within 6 keystrokes, without memorization.
Even the best Python IDEs (strongly typed, but still dynamically typed) pale in comparison to this experience.
When will the scripting world learn what they're missing?
Anm
(For the record, my prefered langauge is Java, but my current work has me doing C, C++, Python, and Perl as necessary. While I haven't worked in it, I assume C# is in the same boat as Java: statically typed, runtime reflexective, dynamically loadable, useful exceptions/stack traces, and large library including the source compiler itself.)
Re:I hate dynamic languages (Score:2)
I love PHP and Perl still and I think for smaller projects it can be easier but its hard to go back now that I've seen the advantages of C#.
Re:I hate dynamic languages (Score:1)
Dynamic typing is awesome. Introspection is awesome. Being able to read your friends' programs without having to run them through "indent" is awesome.
-dave
Re:I hate dynamic languages (Score:4, Interesting)
The first is commenting. (If you can't keep your comments in sync with your code, you have a much bigger problem that you should work out before you even start to argue language paradigms.)
As for the second, there is nothing in the definition of a dynamically typed language that says you can't include types for function parameters. Personally, I would love to see a dynamcially typed language whose syntax allows for it. In the end, it would just be so much syntactic sugar - a dynamically typed language would just convert the value you pass to the function if it doesn't match the type. However, it would force a higher minimum for readability in code, and it would provide a mechanism for having a -Wall style compiler option for giving warnings about type mismatches. (And before anybody complains, yes, there would be a generic type for functions and data structures that you really do want to be able to handle everything.)
Really, I think the whole reason why this hasn't happened in any popular scripting languages is becuase the popular scripting languages are designed for very small projects, where you really don't get that much benefit from such a feature. Plus, in my experience, programs written in dynamically typed languages do tend to be better commented. It's a lot harder to escape when you're dealing with a class of languages that tends to be rather on the terse side of things.
Re:I hate dynamic languages (Score:2)
When a feature because so predominant that it not only qualifies as a key point in the defintion of the class, but becomes
key feature that names the class, it takes a fundamental distinction. I've tried to make myself as clear as possible given the situation. I'd jump at Python if it was staticly typed and had an eclipse editor plugin. That said, my ideal language does not exist yet and I can't offer counter examples to clarify further (although I'm
Re:I hate dynamic languages (Score:3, Interesting)
I'll follow your new example. Why don't we allow for casting suggestions on struct or class members as well? We can take this as far as we want. I it's just documentation sugar and a debugging aid.
Secondly... you want to make programmers go through the effort of naming their types, but you're not going to enforce them? So de
Re:I hate dynamic languages (Score:1, Interesting)
Re:I hate dynamic languages (Score:5, Insightful)
>
> updateCustomerAccount( customer, newInfo )
>
>Looks nice, with very descriptive function name and parameters. But it isn't. Is customer a string name, a an accountId, or a data structure? Does it return anything (success or failure code)? And a little more debatable, does it throw any errors.
Ah. is customer an object? is the new info an object?
is it smart-merging "newInfo" to "customer"?
I can come up with a bunch of things that might affect how one uses this function that would not be infomationalized by the addition of types:
is it accessing an outside system, such as a database?
is it asynch?
Does it assume security of the user? In the Customer update log, what is the name of the person who entered the newInfo?
Is the newInfo an xml document with inbedded base64 pdf? (i've seen in, in mortgage systems)
Does it notify a third-party in case of failure, logging to the logger, and returning a "pending verification" semi-error code?
Does it allow for customer to be empty, and if so, does it create a new customer?
Does it allow either to be empty, thereby creating a new customer with blank, or default information?
if the newInfo contains a dataset with as-yet unknown fields, is the system desinged to automatically add the fields as xml tags in the customer xml storage?
Is the previous information in the customer file store elsewhere? as in a change log?
All functions need a solid API. Since you're going to have an API, you might as well put the type handling in it.
If a programmer can't be bothered to keep the API docs updated, he is not staying on my team.
To some questions, the answer is Python.
Re:I hate dynamic languages (Score:1)
I'll agree with you though that it makes things easier sometimes.
Re:I hate dynamic languages (Score:2)
So I would say having the typing is a big deal.
Anm
Greenspun's 11th Law (Score:2)
Lisp started out like a dynamic language -- interpreted, no data typing, everything is a list -- but it evolved to having a compiler, having arrays as well as lists, and way to specify data type or for the compiler to make a
Re:I hate dynamic languages (Score:4, Interesting)
If reading source code takes you out of your current objective, you have a write-only view of programming, and that's a problem. Take a look at http://www.spinellis.gr/codereading/
Re:I hate dynamic languages (Score:2)
Or it could be that you're reading code which isn't in your program flow. Which means you need to hold more in memory.
Re:I hate dynamic languages (Score:5, Interesting)
I'll give you a pathological example. Consider the Hello World program written in bash (a dynamic language) and Java (a static one). Java looks like this:
Bash looks like this: This isn't really a fair comparison per se, but hopefully it illustrates my point regarding the complexity of the problem versus the effort required to code the solution. On the one extreme, you have the "static" languages designed for coding entire "systems programming products" (to borrow a term from Fred Brooks). Of these, the good ones (eg. Eiffel, with its superb multiple inheritance facilities) scale up well to large systems, so the asymptotic slope of the complexity-effort curve is small. However, that curve doesn't cross the origin; that is, as the problem becomes trivially simple, the code required to express the solution reaches some fixed minimum size. In the case of Java, for instance, every program must declare a class with one public static void method taking an array of strings as an argument. That's why nobody uses Java as a command shell.On the other extreme, you have shell languages. They do indeed intersect the origin of the complexity-effort curve: that is, it is possible to write a two-character program that does something very simple, such as "cd" or "fg" in bash. If you allow aliases, or UNIX commands like "w", you can write meaningful one-character programs. (This is impossible in Java, no matter what definitions or libraries you presuppose.) However, the slope of the complexity-effort curve is high, and after a program gets larger than a few hundred lines of code, bash becomes almost unusably awkward.
In between, you have "dynamic" languages like Python. Its curve doesn't hit the origin, and its asymptote's slope is higher than Java's, but there is a sizeable range of programs for which a Python solution requires less effort (at least for me) than bash or Java.
So, as many others have said, it pays to have a number of tools in your toolchest.
Re:I hate dynamic languages (Score:2)
What's the problem with that?.
If you allow aliases, or UNIX commands like "w", you can write meaningful one-character programs. (This is impossible in Java, no matter what definitions or libraries you presuppose.)
Wrong. Aliases has nothing to do with a language. You can alias w=java -jar myapp.jar or whatever
Re:I hate dynamic languages (Score:3, Interesting)
In the case of Java, for instance, every program must declare a class with one public static void method taking an array of strings as an argument. That's why nobody uses Java as a command shell.
What's the problem with that?.
The problem with that is for extremely simple programs. And by extremely simple, I'm talking about stuff that barely even qualifies as a program, but would be tiresome to type over and over again. Consider, for example, the case of the classic "Hello, World" program, that the GP ga
Re:I hate dynamic languages (Score:1)
Re:I hate dynamic languages (Score:2, Interesting)
bar = map( lambda x: x[1], foo )
Maybe it's possible to do that with static typing, but if so it would add so much grief in making sure all the type related stuff fits together as to be barely worth doing. And it is worth doing.
So I'm moving toward the conclusion that dynamic typing in and of itself is a
Re:I hate dynamic languages (Score:2)
I'll be the first to admit that even the best statically typed languages have much to learn from the best dynamic languages like Python. Java is barely beginning to learn the value of integrating the most commonly used data structures into the language, he
Re:I hate dynamic languages (Score:2)
Re:I hate dynamic languages (Score:2)
Re:I hate dynamic languages (Score:2)
I've read and worked on relativly big projects in python like zope, and I have come to the conclusion that the arguments for static typing, while valid, might focus on a too small subset of the task of getting a solid program done.
What I mean is, yes, static typing gives you some guiding, but on the other hand, it seems to have the effect that the developers might "not see the wood fo
Re:I hate dynamic languages (Score:2)
If you try to write C or Java programs in Python (or other dynamic language) you will have those problems. If you use the language 'The Right Way', it will be much less of a problem.
For example, why not have updateCustomerAccount throw an exception if you give it something it can't promote to the right type? Admittedly, type checking isn't useless by any means, it's just not fundamentally necessary for writing and testing. Perhaps it could be added to a dynamic language in the form of a type tag that is i
Re:I hate dynamic languages (Score:2)
Re:I hate dynamic languages (Score:2)
Something Thomas said I don't understand... (Score:2)
Re:Something Thomas said I don't understand... (Score:1, Informative)
Re:Something Thomas said I don't understand... (Score:2)
But this such a low level, and has been going on for so long, that's it's completely pointless to the topic of programming languages.
Re:Something Thomas said I don't understand... (Score:3, Informative)
Re:Something Thomas said I don't understand... (Score:3, Informative)
You feed a modern processor (assuming x86 compatible) x86 assembly, but internally it executes it's own format of operations. During the fetch/decode stage the x86 operations are "translated" into the internal micro-ops format.
As such one x86 op may correspond to many internal micro-ops. This is done for several reasons, one of the more fundamental being that x86 asm is now a horrible mess that is not suitable to feed into an extremely optimised processor core.
Re:Something Thomas said I don't understand... (Score:2)
On a similar note, x86 programming model was always a horrible mess that is not suitable to feed into a programmer or, for that matter, a compiler. It really is junk, but it was junk on the day IBM decided to use it. Motorola had much better chips on the market at the time.
This is why x86 runs so hot and slow: the instruction set, and especially the register set, is
The ideal language (processing methodology) (Score:5, Insightful)
What I'd like to see: As I enter code in the language, the system does syntax checking and builds the necessary data structures, prompting and possible asking questions about ambiguities and any necessary library functions either not found or not called correctly. In fact, this process might as well be graphical in nature - NeXTstep's Interface Builder perhaps came closest to this in my experience. The code should be runnable immediately, in an interpreted environment - a la Perl/Python/PHP etc.
Thus language processing system would act as an intelligent assistant, looking over the system as I design and build it and making suggestions. It might even make performance predictions based on its analysis of the code-so-far.
Once the functionality is complete, I can pass the system to an even smarter optimizing compiler function, which does the necessary things to make it efficient, small, fast, etc. In the process the compiler may ask more questions about how to resolve various issues that didn't come up earlier. Since the functionality is already defined, the compilation has a mostly-known target for functionality. This process can take as long as necessary, perhaps while I go home for dinner; using more heuristics, AI, whatever, to further improve and clean up the system for the defined functionality.
Except for the AI features, this combined capability is actually old. Back in the Long Ago, Harris computers ran the Vulcan OS, which had a n interactive FORTRAN system. It did line-by-line compiling, doing syntax checking on each line and even running the code. Once your program was complete and ran, the interactive compiler could output correctly-formatted FORTRAN that could be compiled using the standard FORTRAN compiler.
Re:The ideal language (processing methodology) (Score:2)
This is
Squeak and OpenCroquet... (Score:2)
i take exception with this (Score:2, Interesting)
perhaps it makes you a more capable craftsperson, but just having the tools does not really help. better? maybe, but not necessarily good. it's knowing when to use one over the other that really makes you good.
that being said, i love perl for quick stuff, i/o and text processing, and lots of other things. php is great for web and i
Re:Code Insight (Score:1, Interesting)