4
12 Computer Published by the IEEE Computer Society INDUSTRY TRENDS S oftware developers are always looking for ways to boost their effectiveness and productivity and per- form complex jobs more quickly and easily, particularly as projects have become increasingly large and complex. Programmers want to shed un- needed complexity and outdated methodologies and move to ap- proaches that focus on making pro- gramming simpler and faster, said Stephan Deibel, chair of the Python Software Foundation and cofounder of Wingware, a Python development environment vendor. With this in mind, many develop- ers are increasingly using dynamic languages such as JavaScript, Perl, Python, and Ruby. Although software experts disagree on the exact defini- tion, a dynamic language basically enables programs that can change their code and logical structures at runtime, adding variable types, mod- ule names, classes, and functions as they are running. These languages fre- quently are interpreted and generally check typing at runtime. Dynamic languages provide an alternative to the more widely used static languages such as C++ and Java. Programs written in static lan- guages have rigid code and logical structures and remain as they are unless the programmer changes them. Static languages generally are compiled, and they check typing in the compilation stage, before the program starts executing. A survey by Tiobe Software—a software-quality consultancy that maintains an index of programming languages’ popularity—says C, C++, and Java are the most popular. However, the survey also indicates that dynamic-language use has increased recently. This is reflected in the growing use of programming approaches that work with dynamic languages such as AJAX (Asynchronous JavaScript and XML), LAMP (Linux; the Apache Web server; the MySQL database- management system; and Perl, PHP, or Python), and Ruby on Rails. Also, major companies such as Microsoft and Sun Microsystems are supporting dynamic languages in their development platforms. Dynamic languages are flexible and can let developers write more to- the-point code quickly and easily, said Python creator Guido van Rossum, who works on develop- ment research for Google. And numerous dynamic languages are open source, which appeals to many developers, noted Carl Howe, principal analyst for Blackfriars Communications, a market research firm, and a longtime Unix kernel coder. Now, developers are better able to choose dynamic or static languages, depending on which better suits their needs, said Rice University associate professor Dan Wallach. Despite the enthusiasm, dynamic languages have their drawbacks and concerns, including many develop- ers’ unfamiliarity with them. Moreover, said Kingston Uni- versity professor Les Hatton, com- puting has proven to be “a fashion industry with little or no relationship with engineering,” and many new programming approaches are “just something new to try before some- thing newer comes along.” INSIDE DYNAMIC LANGUAGES Typing is the main, but not the only, factor in determining whether a language is dynamic. Typing In programming, a type system defines how a language classifies similar types of values and expres- sions, how it can manipulate them, and how they interact with one another. This generally includes a description of the data structures that the language enables. Static languages are generally, but not always, strongly and statically typed. Dynamic languages are usu- ally, but not always, weakly and dynamically typed. Some dynamic languages, such as Lisp, are strongly typed. And some static languages, such as C and C++, are weakly typed. With statically typed languages, programs explicitly declare—but need not define—variables before they are used. Many programmers like the structure that forced variable declaration creates. Developers Shift to Dynamic Programming Languages Linda Dailey Paulson

04085614

Embed Size (px)

DESCRIPTION

04085614

Citation preview

  • 12 Computer P u b l i s h e d b y t h e I E E E C o m p u t e r S o c i e t y

    I N D U S T R Y T R E N D S

    S oftware developers arealways looking for ways toboost their effectivenessand productivity and per-form complex jobs morequickly and easily, particularly asprojects have become increasinglylarge and complex.

    Programmers want to shed un-needed complexity and outdatedmethodologies and move to ap-proaches that focus on making pro-gramming simpler and faster, saidStephan Deibel, chair of the PythonSoftware Foundation and cofounderof Wingware, a Python developmentenvironment vendor.

    With this in mind, many develop-ers are increasingly using dynamiclanguages such as JavaScript, Perl,Python, and Ruby. Although softwareexperts disagree on the exact defini-tion, a dynamic language basicallyenables programs that can changetheir code and logical structures atruntime, adding variable types, mod-ule names, classes, and functions asthey are running. These languages fre-quently are interpreted and generallycheck typing at runtime.

    Dynamic languages provide analternative to the more widely usedstatic languages such as C++ andJava. Programs written in static lan-guages have rigid code and logicalstructures and remain as they areunless the programmer changes

    them. Static languages generally arecompiled, and they check typing inthe compilation stage, before theprogram starts executing.

    A survey by Tiobe Softwareasoftware-quality consultancy thatmaintains an index of programminglanguages popularitysays C, C++,and Java are the most popular.However, the survey also indicatesthat dynamic-language use hasincreased recently.

    This is reflected in the growing useof programming approaches thatwork with dynamic languages such asAJAX (Asynchronous JavaScript andXML), LAMP (Linux; the ApacheWeb server; the MySQL database-management system; and Perl, PHP,or Python), and Ruby on Rails.

    Also, major companies such asMicrosoft and Sun Microsystems aresupporting dynamic languages intheir development platforms.

    Dynamic languages are flexibleand can let developers write more to-the-point code quickly and easily,said Python creator Guido van

    Rossum, who works on develop-ment research for Google.

    And numerous dynamic languagesare open source, which appeals tomany developers, noted Carl Howe,principal analyst for BlackfriarsCommunications, a market researchfirm, and a longtime Unix kernelcoder.

    Now, developers are better able tochoose dynamic or static languages,depending on which better suitstheir needs, said Rice Universityassociate professor Dan Wallach.

    Despite the enthusiasm, dynamiclanguages have their drawbacks andconcerns, including many develop-ers unfamiliarity with them.

    Moreover, said Kingston Uni-versity professor Les Hatton, com-puting has proven to be a fashionindustry with little or no relationshipwith engineering, and many newprogramming approaches are justsomething new to try before some-thing newer comes along.

    INSIDE DYNAMIC LANGUAGESTyping is the main, but not the

    only, factor in determining whethera language is dynamic.

    TypingIn programming, a type system

    defines how a language classifiessimilar types of values and expres-sions, how it can manipulate them,and how they interact with oneanother. This generally includes adescription of the data structuresthat the language enables.

    Static languages are generally, butnot always, strongly and staticallytyped. Dynamic languages are usu-ally, but not always, weakly anddynamically typed.

    Some dynamic languages, such asLisp, are strongly typed. And somestatic languages, such as C and C++,are weakly typed.

    With statically typed languages,programs explicitly declarebutneed not definevariables beforethey are used. Many programmerslike the structure that forced variabledeclaration creates.

    Developers Shift to DynamicProgrammingLanguagesLinda Dailey Paulson

    r2intr.qxp 23/1/07 12:05 PM Page 12

  • February 2007 13

    amounts of coderather than de-tailed, highly specific program-mingand quickly produceapplications, which is importantwhen an organization needs soft-ware to solve an urgent problem.

    Python would use 10 to 20 per-cent of the amount of code that Javaor C++ would use to write the sameapplication, according to Deibel.

    Being able to write code quicklyand efficiently removes some of thedetailed and repetitive work fromprogramming and lets developersfocus more on creative matters,Hansson said.

    However, Hatton contended,many of these languages are insuffi-ciently tested in mission-criticalapplications for businesses to riskusing for these purposes.

    And traditionally, dynamic lan-guages havent performed as well asstatic languages because of the extraruntime checking. According toGoogles van Rossum, The extrainformation kept around at runtimeto enable the checking by dynamiclanguages can cause their memoryusage to increase.

    And the CPU must work harderbecause it has to evaluate more run-time-checking instructions, accord-ing to Jason McConnell, productmanager in Microsofts DeveloperDivision.

    However, todays faster processorsand larger memory capacities arehelping to reduce this concern.

    Increased flexibility Because applications written with

    dynamic languages dont have toexplicitly declare variables and someother structural items before theyare used, the programs can intro-duce variable types, module names,classes, and functions on the fly,thereby providing programmerswith flexibility.

    However, this also means dynamiclanguages are not well-suited to rigidtypes of software development suchas system programming, whichrequires static types and interfaces.

    With dynamic languages, devel-

    With dynamically typed lan-guages, programs must define vari-ablesbut not explicitly declarethembefore they are used. Thiseliminates the need to write as muchcode. And many programmers likethe ability to flexibly use a variableat will when required, without hav-ing to declare it.

    Programming languages in whichvariables are bound to specific datatypes are considered strongly typed.In weakly typed languages, variablesare not bound to a specific data type,which again provides more flexibil-ity but less structure.

    Ins and outs of static anddynamic languages

    Strong typing enforces rules as towhat programs can do with variouselements by detecting and correct-ing type-related errors at compiletime.

    Weak typing allows some prede-fined exceptions to type-related rulesor uses a type-violation mechanism,generally for cases in which a spe-cific rule violation wont cause prob-lems for a program. Weak typingcorrects the type-related errors forwhich there are no exceptions atruntime.

    It thus avoids the overhead of cor-recting at compile time the errorsthat wont cause problems for a par-ticular program. However, Wing-wares Deibel noted, strong typingdetects errors sooner, at compiletime, which is more efficient.

    Programmer and Ruby on Railscreator David Heinemeier Hansson,a partner in the 37signals Web-appli-cation-development firm, said thetime it takes for static typing toenforce all rules throughout theprocess can make it unreasonablyslow to get projects to fruition.

    Dynamic languages let developersget results quickly, said BlackfriarsHowe.

    Their code is more compactbecause, for example, there is notype-declaration overhead, Deibelexplained. This lets developers de-clare commands efficiently via small

    opers can easily do thingssuch asnot defining a type for a variable ornot defining an interface or abstractclassthat are often considered badpractice and that they could notreadily do with static languages.With some programs, though, doingthese things might be desirablebecause they would be more efficientand might not cause development-related problems.

    DYNAMIC LANGUAGESDynamic languages are not new,

    said Blackfriars Howe. He notedthat languages such as APL and Lispwere developed in the late 1950s.There have been many since thensuch as ABAP, Groovy, SAS, andTclwith several becoming verypopular, as Table 1 shows.

    JavaScript and ECMAScriptJavaScript (http://developer.mozilla.

    org/en/docs/About_JavaScript), basedloosely on the strongly typed Java,is a scripting language, also stronglytyped, that Netscape Communications

    Table 1.Tiobe Software listing of mostpopular programming languages.

    Popularity Static/ranking Language Dynamic

    1 Java Static 2 C Static 3 C++ Static 4 Visual Basic Static 5 PHP Dynamic 6 Perl Dynamic 7 C# Static 8 Python Dynamic 9 JavaScript Dynamic

    10 Ruby Dynamic 11 SAS Dynamic 12 Delphi Static 13 PL/SQL Dynamic 14 D Static 15 ABAP Dynamic 16 Lisp/Scheme Dynamic 17 Ada Static 18 Cobol Dynamic 19 Pascal Static 20 Transact/SQL Static

    r2intr.qxp 23/1/07 12:05 PM Page 13

  • 14 Computer

    I N D U S T R Y T R E N D S

    PythonVan Rossum created Python

    (www.python.org) in 1990. It is anopen source, interpreted, object-ori-ented, dynamically typed languagesimilar to Perl. Pythonwhich vanRossum named after the MontePythons Flying Circus TV showis known for its clear, simple syntaxand readability.

    The language is highly portable,as a number of operating systemsincluding the Mac OS, Unix, andWindowscan interpret its state-ments.

    Natively, Python supports struc-tured programming and has fea-tures that work with functional andaspect-oriented programming. Thelanguage supports other program-ming approaches via extensions.

    Developers, including those forGoogle, use the flexible Python forcreating many types of applications.

    RubyComputer scientist and program-

    mer Yukihiro Matsumoto publiclyreleased Ruby in 1995.

    Rubysimilar to Perl and Small-talkis an open source, interpreted,fully object-oriented language knownfor being clean, concise, consistent,structured, extensible, and portableto multiple operating systems such as Linux, the Mac OS, Unix, andWindows.

    To be useful with extreme pro-gramming, Ruby lets developerswrite parts of applications in otherlanguages when that is best for aproject.

    Ruby is dynamically typed andsupports object-oriented, proce-dural, and functional programming.

    INCREASING SUPPORTDevelopers have created several

    created in 1995. It can be embeddedinto a Web pages HTML code to adddynamic content that can respond to mouse rollovers and other useractions.

    ECMAScript, which EuropesECMA International and the Inter-national Organization for Standardi-zation have adopted, is a general-purpose, cross-platform scriptinglanguage created to capture the common core elements of Java-Script and Microsofts comparableJScript.

    PHPIn 1995, programmer Rasmus

    Lerdorf released PHP, the most pop-ular of the dynamic languages,according to Tiobes survey.

    PHP (the initials originally stoodfor personal home page) is anopen source, server-side, cross-plat-form, object-oriented scripting lan-guage for creating dynamic Webpages. Users insert the PHP codeinto a pages HTML code.

    The PHP Data Objects extensiondefines lightweight and consistentinterfaces for accessing various rela-tional databases.

    Microsoft is working with ZendTechnologies, a vendor of PHP products and services, to enable the language to run smoothly onWindows.

    PerlProgrammer Larry Wall released

    the Practical Extraction and Re-porting Language (www.perl.org) in1987.

    Perl is a Unix-based, open source,interpreted, server-side program-ming language for writing Webscripts. It was originally designed toprocess and manipulate text andthus is used extensively with Web-based forms. Developers utilize thelanguage for various tasks, such asWeb and GUI development and net-work programming.

    Perl supports procedural, object-oriented, and functional program-ming approaches, as well as auto-matic memory management.

    increasingly popular developmentplatforms that use dynamic lan-guages. And some large technologycompanies are including dynamic-language support in their develop-ment environments to attractprogrammers looking for suchapproaches.

    LAMP. Designed to provide a flex-ible way to develop applications,primarily for the Web, the LAMPplatform (www.lampware.org) hasbecome important in the last coupleof years because many people areinterested in simple Web applica-tions, noted van Rossum. Recently,companies have been using LAMPfor more complex programs.

    AJAX. Developers are usingAJAXa set of technologies mostlydeveloped in the 1990sto buildWeb applications that perform bet-ter than traditional Web programsand that look and act more likedesktop software.

    Seaside.Released in 2004, Seaside(www.seaside.st) is an AJAX-likeframework for developing Webapplications with the Smalltalkdynamic language.

    Ruby on Rails. Ruby is the foun-dation of Ruby on Rails, a develop-ment platform that programmersare increasingly embracing becauseit is open source and easy to use.Hansson developed Rails, which uti-lizes integrated programming pack-ages and preset code, known asconventions, designed to be completeand ready to work with immedi-ately, without the need for configu-ration.

    Proponents say Rails is best suitedto building infrastructures that pullinformation from a database to aWeb application, such as those usedin e-commerce, online communities,and data retrieval.

    Eclipse Foundation. The EclipseFoundationa nonprofit organiza-tion for advancing the Eclipse plat-form of open source, Java-based,software-development toolsisadding a PHP-integrated develop-ment environment.

    Microsoft. Microsoft is backing

    Major companies are supporting dynamic

    languages in their development platforms

    r2intr.qxp 23/1/07 12:05 PM Page 14

  • dynamic languages such as Iron-Python, JScript, and PHP. The com-pany is supporting dynamic lan-guages in areas such as the .NETframeworks common language run-time (CLR), which manages the exe-cution of programs written in any ofseveral supported languages.

    Meanwhile, Microsoft is hostingthe Phalanger compiler project on itsCodePlex collaborative-develop-ment portal. The compiler lets PHPscripts run on .NET without modi-fications.

    Sun. Of the Java platforms threelegsthe virtual machine, the APIs,and the languagethe language legis replaceable, explained Tim Bray,Suns director of Web technologies.He said Sun will enable Java to sup-port various languages, includingdynamic ones.

    Currently, the company supportsJavaScript in its Java platforms and

    via its NetBeans integrated develop-ment environment. Sun also recentlyhired the developers of JRuby, a Javaimplementation of Ruby, accordingto Bray.

    B ray, like many other industryobservers and programmers,predicted that dynamic lan-guages will continue developing andgrowing in popularity and support.

    Kingston Universitys Hatton,however, disagreed, saying thatdynamic languages are just the cur-rent software-development fashion.They will appear, hang around fora while, and then disappear, heexplained. This is what happenswhen fashion dictates progressrather than engineering conceptssuch as measurement, validation,root-cause analysis, and defect pre-vention.

    Bray noted that many dynamiclanguages dont have the tools orperformance necessary for buildinglarge software. But, he added, someof their agility-related features areslowly percolating into enterpriselanguages such as Java, which willmake them more useful.

    Howe concluded, All these lan-guages are a means to an end. Theycan help some group of people do ajob they need to do more easily.Languages are tools for program-mers. As the problems change, peo-ple use new languages.

    Linda Dailey Paulson is a technologywriter based in Ventura, California.Contact her at [email protected].

    February 2007 15

    Editor: Lee Garber, Computer,[email protected]

    The field Semantic Computing applies technologies in natural language processing, data and knowledge engineering,software engineering, computer systems and networks, signal processing and pattern recognition, and any combi-nation of the above to extract, access, transform and synthesize the semantics (contents) of multimedia, texts, ser-vices and structured data.

    The IEEE International Conference on Semantic Computing (ICSC2007) is an international forum for researchers toexchange information regarding advancements in the state of the art and practice of semantic computing, as well asto identify the emerging research topics and define the future of semantic computing. The technical program ofICSC2007 will consist of invited talks, paper presentations, and panel discussions.

    Submissions of high quality papers describing mature results or on-going work are invited. Topics for submissioninclude but are not limited to:

    Natural language understanding and processing Understanding and processing of texts and

    multimedia content Content-based retrieval of texts, images, videos

    and audios Speech recognition Semantic web search Semantic web services Semantic annotation of multimedia contents

    IEEE First International Conference onSemantic Computing

    September 17-19, 2007

    Hyatt Regency Irvine, Irvine, California

    hhttttpp::////iiccsscc22000077..eeeeccss..uuccii..eedduu//

    ICSC 2007Sponsored by:

    Natural language driven computing Multimedia driven computing Question answering Spoken dialogue and multi-modal systems Data, knowledge and software engineering issues Integration of semantic systems Semantic computing and wireless communications Content-based security Applications of semantic computing Hardware support for semantic computing

    r2intr.qxp 23/1/07 12:05 PM Page 15