March 21, 2003

Environment, behavior, and scripting

Developers are better when 'multilingual'

When Chad Dickerson's column was mobbed by the Slashdot crowd, I was reminded that the role of scripting is still very much unsettled. I won't join that debate, because there are valid arguments on all sides. Scripting languages such as Perl and Python are more productive than conventional languages such as Java and C# — except when they aren't. Likewise, Java and C# are more robust than their scripting cousins — except when they aren't. This just isn't an either/or issue. We cling to the notion that developers need to master only one programming language, but this notion has never been true. The short list, nowadays, might be Java or C#, SQL, JavaScript, Perl or Python, XSLT (Extensible Stylesheet Language Transformation), and maybe a Unix shell language.

These languages differ along two axes: environment and behavior. JavaScript, for example, is a powerful and dynamic scripting language that can in principle be used in almost any environment but in practice is most often wielded from within the browser, with which it has a special relationship. Perl, Python, and Ruby provide their own environments in the form of libraries (such as Perl's Comprehensive Perl Archive Network, or CPAN) that mix scripted and compiled modules. Java's environment is defined by its class libraries, as is that of C#.

Behavior differences begin with syntax. Usually, scripting languages are much more concise than their conventional cousins. As Ward Cunningham has pointed out, less clutter aids clear thinking. But the dynamic nature of scripting languages is what really sets them apart. Data structures need not be declared in advance but can instead be discovered on the fly. This iterative and exploratory process is, for me, the most compelling and yet least well-understood benefit of scripting.

Ideally that benefit would be available in every environment. Web services are helping a lot. Databases and application servers that offer SOAP interfaces make it easy to compose applications in script. But there's always been an urge for deeper and more direct integration. A stunning example of what's possible is Jython, which marries Python to Java. In Jython, you can work interactively with the Java libraries, and create applets or servlets far more concisely than in Java. That's possible because Jython is a complete Python interpreter written in Java — an extraordinary tour de force. As you'd expect, there are performance issues with this layered approach. What's more, a similar Herculean effort is required to marry another language to Java — an effort which, in fact, many have undertaken.

Close

On Twitter now

Application development

Powered by Twitter

White Paper

D2D Virtual Tape Library Replication Primer

This whitepaper explains the terminology and concepts behind Data Replication technologies and establishes some sizing rules through worked examples. Learn the new paradigm in disaster tolerance—protect data anywhere.

Download now »

White Paper

An Alternative to Virtualization for Datacenter Cost Savings

Server virtualization is a popular option for dealing with mounting datacenter costs. Another equally promising approach is the use of an Application Delivery Controller. Citrix NetScaler provides a low-cost way for organizations to reduce their server count and accrue cost savings from a reduction in space, cooling, power and personnel.

Download now »

White Paper

Why Your Firewall, VPN, and IEEE 802.11i Aren't Enough to Protect Your Network

The emergence of WLANs has created a new breed of security threats to enterprise networks.

Included in HP ProCurve WLAN solutions is security technology that alleviates threats from WLANs through:
* Monitoring wireless activity inside and out of the enterprise
* Classifying WLAN transmissions into harmful and harmless
* Preventing transmissions that pose a security threat to the enterprise network
* Locating participating devices for physical remediation

Download now »

White Paper

Bringing the Edge to the Data Center

Effectively address data protection challenges, implementing solutions that help store and protect business–critical data while cutting costs and improving efficiency and reliability.

Download now »

Sign up to receive InfoWorld Resource Alerts

Subscribe to the Developer World Newsletter

Receive a weekly roundup about the art and science of software development.

©1994-2009 Infoworld, Inc.