SlideShare a Scribd company logo
One Ring to Rule Them All?




Why Programming Languages Matter
                                   1
2
Some people think, and act, like Java is the One Programming Language to Rule Them All. Is it
really? Is it possible to have everything you need in a single language?
TIOBE Programming Community Index

              1                    Java                               19.002%
              2                     C                                 15.931%
              3                    C++                                10.116%
              4               (Visual) Basic                           9.161%
              5                    PHP                                 8.882%
              6                     C#                                 5.609%
              7                   Python                               4.731%
              8                    Perl                                4.303%
              9                 JavaScript                             3.360%
             10                   Delphi                               3.303%
                                                                   January 2009
                                                                                            3
Interestingly, Ruby is #11 and is the only other language with greater than 3% reporting.
4
From a Cadbury chocolate label. Simple things, like this list of ingredients, are relatively easy to
translate. Concepts, logic and emotions are much harder.
5
Sandburg reminds us that language, like culture, is always changing. What we mean when we use a
particular word evolves and changes. Consider the word “flour”, for example. In the Middle English
of the Canterbury Tales, it means a flower. Nowadays it typically means ground wheat.
“if something can't be said, then it
               can't be thought”
                                              -- Orwell

                                                                                                6
In George Orwell’s 1984, NewSpeak was an attempt to control what people could think by
controlling what they could say. Can you think of analogies to computer programming languages
that you use?
7
These are obviously shoes. They have dierent shapes, colors, sizes and styles, yet we immediately
recognize them as shoes. Some languages insist on attaching implicit metadata about objects, such
as gender (e.g. German, Italian) or even general shape (e.g. Japanese, -mai, -hon forms as in “kutsu
ni-hon”). Consider also the dierence between material types in English (“some sand” vs. “a sand”).
8
When does an object become a shoe? Or stop being a shoe? We often pretend that our words have
hard, Boolean meanings, but they are really quite flexible. This strongly dierentiates human
languages from programming languages.
quot;The limits of my language mean the limits
        of my world.quot;
                                     -- Wittgenstein




                                                                                                 9
Ludwig Wittgenstein (1889–1951) was “an Austrian-British philosopher who worked primarily in
logic, the philosophy of mathematics, the philosophy of mind, and the philosophy of language”.
[Wikipedia]
quot;About what one can not speak, one must
remain silent.quot;
                           -- Wittgenstein




                                             10
quot;The structures of your language shape the
        way you think and perceive the world.quot;
                            - Sapir-Whorf Hypothesis




                                                                                                 11
Cognitive research has proven a link from language to perception, but it seems to be weaker in
adults. The “strength” of the Sapir-Whorf is an area of controversy [http://scienceblogs.com/
cognitivedaily/2005/05/does_our_language_aect_our_t.php]
Language is innate and universal
                                                                         - Chomsky




                                                                                                      12
Noam Chomsky (1928-) is an American linguist, philosopher, cognitive scientist, political activist,
author, and lecturer. [Wikipedia]
quot;Some people argue that language just
         changes what you attend to, but what
         you attend to changes what you encode
         and remember.quot;
                                 -- Lera Boroditsky




                                                                                                   13
Lera Boroditsky is an Assistant Professor of Psychology at Stanford University doing research in
cognitive science with a specific focus on cognitive linguistics. [Wikipedia]
14
Perhaps there is no “one ring”. Perhaps the ring is made of many possible components, or maybe
even fractal...
Chimeric Programming




                                                                                             15
Chimeric programming; like the mythical Chimera which was a beast made of parts of many animals
(related to the Hydra and Cerberus).
Chimera on a red-figure Apulian plate, ca 350-340 BCE (Musée du Louvre) -- Wikipedia
Use many languages to say the right thing at the right time.
Kinnersley’s Categories
                                                          Constraint
         Procedural
                                                          Object-Oriented
         Imperative
                                                          Concurrent
         Declarative
                                                          Fourth Generation
         Applicative
                                                          Query
         Functional
                                                          Specification
         Definitional
                                                          Assembly
         Single Assignment
                                                          Intermediate
         Dataflow
                                                          Metalanguage
         Logic


                                                                                                 16
Bill Kinnersley, husband of a University of Kansas EE prof and coder. He maintains the list of
computer languages at http://people.ku.edu/~nkinners/LangList/Extras/langlist.htm
Kinnersley’s Categories
                                                                    Java, Javascript
                                                         Object-Oriented BeanShell
         Procedural
                                                         Constraint
         Imperative
         Declarative HTML, CSS                           Concurrent
                                                         Fourth Generation
         Applicative
         Functional XSL, RelaxNG                         Query SQL
                                                         Specification
         Definitional
                                                         Assembly
         Single Assignment
         Dataflow DPML                                    Intermediate
                                                         Metalanguage XML, BNF
         Logic


                                                                                  17
Languages used for the PURL project, notionally written in Java.
Kinnersley’s Categories
                                                                             Java
                                                          Object-Oriented Javascript
         Procedural
                                                          Constraint
         Imperative
         Declarative HTML, CSS                            Concurrent
                                                          Fourth Generation
         Applicative
                      XSL, XPath                          Query SPARQL
         Functional
                       XQuery
                                                          Specification
         Definitional
                                                          Assembly
         Single Assignment
         Dataflow Drools, DPML                             Intermediate
         Logic OWL, SKOS                                  Metalanguage RDF, XML


                                                                                  18
Languages used for the ICFS project, also notionally a Java project.
19
Language features - bells and whistles you should note.
Typing

                                        Dynamic                       Static

               Strong               Ruby/Groovy                     Java/C#

                Weak               JavaScript/Perl                  C/C++

                 From Venkat Subramaniam’s “Programming Groovy”
                                                                                                 20
We used to snub our noses over dynamic languages over features like weak typing. The situation
has changed and we should acknowledge that.
Dynamic/Strong
                             Ruby
$ irb
 i = 10
= 10
 s = quot;stringquot;
= quot;stringquot;
 s + i
TypeError: can't convert Fixnum into String
 from (irb):3:in `+'
 from (irb):3
 from :0


From Nate Schutta’s “JavaScript : The Good, The Bad and the Ugly”

                                                                    21
Dynamic/Weak
                          JavaScript


var i = 12;
var j = quot;helloquot;;
out(i + j)


Yields:
“12 hello”




From Nate Schutta’s “JavaScript : The Good, The Bad and the Ugly”

                                                                    22
Closures

      • Functions that are evaluated in an environment
      containing one or more bound variables.

      • Associated with functional languages.
      • Some OO languages now exposing closures for
      use by programmers - they appear as closed
      anonymous functions.



                                                                                                 23
Closures may be used to implement OO (because state can be hidden and variables maintain state
across calls).
Example later.
Metaprogramming

       • Code that writes code at runtime to perform
       operations traditionally performed at compile time.

       • Typically via dynamic execution of string
       expressions that contain programming commands.




                                                             24
Example later.
Expando Metaclass
       Dynamically add
         • methods
         • constructors
         • properties
         • static methods
       to classes using closures.




                                     25
Example later.
26
The language market is crowded; roughly 2,000 programming languages created in the last four
decades (some 13 of which have “stuck”). Here are some you should know.
Lisp (is back!)
                                        Functional


    • Conditionals                                 • Program as expression
    • Functions as data                            • Symbol type
    • Recursion                                    • Code as tree of symbols
    • Dynamic typing                               • Read/Run/Compile
    • Garbage collection


                         http://www.paulgraham.com/icad.html

                                                                                  27
Also, LISP-variant Clojure for concurrent programming. Clojure runs on the JVM.
Scala
                     OO/Functional



• Pattern matching
• Comprehensions
• Currying
• Mixins



                                     28
Haskell
                    Functional


• Pattern matching
• Currying
• List comprehensions
• Lazy evaluations
• Monads
• Type classes



                                 29
Erlang
                   Functional



• High-performance concurrency
• Fault-tolerant
• Hot-swappable




                                 30
Ericsson AXD 301
                                  HA ATM Switch
                               1,000,000 Erlang LOC

                              Used                Not Used
                    Message-passing              Inheritance
                           Isolation                  Methods
                       Concurrency                    Classes
         Higher-Order Programming                      UML


                                                                31
Written in Erlang, now FLOSS.
No traditionally OO structures used!
JavaScript
                                     Dynamic OO



    • Prototype Inheritance
    • Closures
    • Function as a data type




                                                                                           32
Web 2.0 engine - dynamic language of choice in the Web browser, also on a JVM via Rhino.
Ruby
                             Dynamic OO/Functional



     • Metaprogramming
     • Rails engine!
     • Mixins




                                                                                                   33
Runs on JVM
“Metaprogramming is the writing of computer programs that write or manipulate other programs
(or themselves) as their data, or that do part of the work at runtime that would otherwise be done at
compile time.” [Wikipedia]
Groovy
              Dynamic OO - The next Java syntax?


    • Closures
    • Metaprogramming
    • Grails engine!
    • Builder Syntax (XML, Swing, Data)
    • Access to legacy Java code



                                                   34
Runs on JVM
// By Scott Davis, Brian Sletten
    class FoafPerson {
       Map facts = [:]

    Object invokeMethod(String predicate, Object value) {
        if(facts.containsKey(predicate)) {
            value.each{ obj -
               facts.get(predicate).add(obj)
            }
        } else {
            facts.put(predicate, value as List)
        }
      }
    }
                                                            35
Invoking the method that wasn’t there.
brian = new FoafPerson()
    brian.'foaf:name' 'Brian Sletten'
    brian.'foaf:knows' quot;Ericquot;, quot;Davidquot;,quot;Uchequot;
    brian.'foaf:dateOfBirth' '1972-05-26'
    brian.'foaf:interest' quot;http://www.w3.org/RDF/quot;, quot;http://
    www.w3.org/2000/01/sw/quot;




                                                               36
Using the method that wasn’t there.
String.metaClass.get = { context -
     def req = context.createSubRequest(quot;active:httpGetquot;)
     req.addArgument(quot;urlquot;, delegate)
     req.setAspectClass(IAspectString.class)
     def resp = context.issueSubRequestForAspect(req)
     return resp.getString()
   }
  .
  .
  .
  def foaf =
    “http://zepheira.com/team/brian/brian.rdf”.get(context)


                                                            37
Expando metaclass
38
Don’t be an angry monkey (in the learned behavior study sense) - question group think inherent in
language choice.
Photos
Title Ring    http://www.flickr.com/photos/mk1971/1348204498/

One Ring     http://www.flickr.com/photos/generalnoir/391009102/

Language     http://www.flickr.com/photos/margolove/1526032187/

Cadbury        http://www.flickr.com/photos/nofrills/10895361/

 Fractal      http://www.flickr.com/photos/swaymedia/84294191/

Monkey         http://www.flickr.com/photos/oskarn/122047239/

 1984         http://www.newspeakdictionary.com/go-movie.html
                 http://www.flickr.com/photos/visualgrammar/
 Shoes                           114831391/
             http://www.flickr.com/photos/undercover_surrealist/
Bottles                         2405406526/
                                                                  39
Photos
 Crowd        http://www.flickr.com/photos/vividbreeze/480057824/


  Bells    http://www.flickr.com/photos/hirsuteursus/637705224/


                  Quotes
  Orwell                              1984

On Language                 Collected by Brian Sletten


              Others as noted inline
                                                                   40
Questions?




             41

More Related Content

Similar to Why Languages Matter 20090123

intro.ppt
intro.pptintro.ppt
intro.ppt
ssuser77162c
 
A survey paper of virtual friend
A survey paper of virtual friendA survey paper of virtual friend
A survey paper of virtual friendSiddiq Abu Bakkar
 
Natural Language Processing with Python
Natural Language Processing with PythonNatural Language Processing with Python
Natural Language Processing with Python
Benjamin Bengfort
 
Inheritance Versus Roles - The In-Depth Version
Inheritance Versus Roles - The In-Depth VersionInheritance Versus Roles - The In-Depth Version
Inheritance Versus Roles - The In-Depth Version
Curtis Poe
 
The Four Principles Of Object Oriented Programming
The Four Principles Of Object Oriented ProgrammingThe Four Principles Of Object Oriented Programming
The Four Principles Of Object Oriented Programming
Diane Allen
 
Bird05 nltk-intro
Bird05 nltk-introBird05 nltk-intro
Bird05 nltk-intro
Stefano Lariccia
 
Jarrar: Introduction to Natural Language Processing
Jarrar: Introduction to Natural Language ProcessingJarrar: Introduction to Natural Language Processing
Jarrar: Introduction to Natural Language Processing
Mustafa Jarrar
 
Mind Your Language
Mind Your LanguageMind Your Language
Mind Your Language
Kevlin Henney
 
Big Data and Natural Language Processing
Big Data and Natural Language ProcessingBig Data and Natural Language Processing
Big Data and Natural Language Processing
Michel Bruley
 
Pal gov.tutorial4.session12 1.lexicalsemanitcs
Pal gov.tutorial4.session12 1.lexicalsemanitcsPal gov.tutorial4.session12 1.lexicalsemanitcs
Pal gov.tutorial4.session12 1.lexicalsemanitcsMustafa Jarrar
 
Treebank annotation
Treebank annotationTreebank annotation
Treebank annotation
Mohit Jasapara
 
Java As A Programming Language
Java As A Programming LanguageJava As A Programming Language
Java As A Programming Language
Jennifer Wright
 
Representing Translations on the Semantic Web
Representing Translations on the Semantic WebRepresenting Translations on the Semantic Web
Representing Translations on the Semantic Web
Oscar Corcho
 
Oral IV Returns!
Oral IV Returns!Oral IV Returns!
Oral IV Returns!
Ron Martinez
 
A Strong Object Recognition Using Lbp, Ltp And Rlbp
A Strong Object Recognition Using Lbp, Ltp And RlbpA Strong Object Recognition Using Lbp, Ltp And Rlbp
A Strong Object Recognition Using Lbp, Ltp And Rlbp
Rikki Wright
 

Similar to Why Languages Matter 20090123 (20)

intro.ppt
intro.pptintro.ppt
intro.ppt
 
A survey paper of virtual friend
A survey paper of virtual friendA survey paper of virtual friend
A survey paper of virtual friend
 
Natural Language Processing with Python
Natural Language Processing with PythonNatural Language Processing with Python
Natural Language Processing with Python
 
Inheritance Versus Roles - The In-Depth Version
Inheritance Versus Roles - The In-Depth VersionInheritance Versus Roles - The In-Depth Version
Inheritance Versus Roles - The In-Depth Version
 
The Four Principles Of Object Oriented Programming
The Four Principles Of Object Oriented ProgrammingThe Four Principles Of Object Oriented Programming
The Four Principles Of Object Oriented Programming
 
Bird05 nltk-intro
Bird05 nltk-introBird05 nltk-intro
Bird05 nltk-intro
 
Jarrar: Introduction to Natural Language Processing
Jarrar: Introduction to Natural Language ProcessingJarrar: Introduction to Natural Language Processing
Jarrar: Introduction to Natural Language Processing
 
Mind Your Language
Mind Your LanguageMind Your Language
Mind Your Language
 
Big Data and Natural Language Processing
Big Data and Natural Language ProcessingBig Data and Natural Language Processing
Big Data and Natural Language Processing
 
Pal gov.tutorial4.session12 1.lexicalsemanitcs
Pal gov.tutorial4.session12 1.lexicalsemanitcsPal gov.tutorial4.session12 1.lexicalsemanitcs
Pal gov.tutorial4.session12 1.lexicalsemanitcs
 
Treebank annotation
Treebank annotationTreebank annotation
Treebank annotation
 
FinalReport
FinalReportFinalReport
FinalReport
 
Java As A Programming Language
Java As A Programming LanguageJava As A Programming Language
Java As A Programming Language
 
Representing Translations on the Semantic Web
Representing Translations on the Semantic WebRepresenting Translations on the Semantic Web
Representing Translations on the Semantic Web
 
December06Bulletin
December06BulletinDecember06Bulletin
December06Bulletin
 
December06Bulletin
December06BulletinDecember06Bulletin
December06Bulletin
 
Oral IV Returns!
Oral IV Returns!Oral IV Returns!
Oral IV Returns!
 
A Strong Object Recognition Using Lbp, Ltp And Rlbp
A Strong Object Recognition Using Lbp, Ltp And RlbpA Strong Object Recognition Using Lbp, Ltp And Rlbp
A Strong Object Recognition Using Lbp, Ltp And Rlbp
 
AI Lesson 41
AI Lesson 41AI Lesson 41
AI Lesson 41
 
Lesson 41
Lesson 41Lesson 41
Lesson 41
 

More from David Wood

Internet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchainInternet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchain
David Wood
 
Returning to Online Privacy?
Returning to Online Privacy?Returning to Online Privacy?
Returning to Online Privacy?
David Wood
 
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
David Wood
 
BlockSW 2019 Keynote
BlockSW 2019 KeynoteBlockSW 2019 Keynote
BlockSW 2019 Keynote
David Wood
 
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
David Wood
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart City
David Wood
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software Development
David Wood
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable Claims
David Wood
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data model
David Wood
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301
David Wood
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601
David Wood
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors Kill
David Wood
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in Australia
David Wood
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsDavid Wood
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social media
David Wood
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's Journey
David Wood
 
Open by Default
Open by DefaultOpen by Default
Open by Default
David Wood
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926David Wood
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426
David Wood
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesDavid Wood
 

More from David Wood (20)

Internet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchainInternet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchain
 
Returning to Online Privacy?
Returning to Online Privacy?Returning to Online Privacy?
Returning to Online Privacy?
 
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
 
BlockSW 2019 Keynote
BlockSW 2019 KeynoteBlockSW 2019 Keynote
BlockSW 2019 Keynote
 
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart City
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software Development
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable Claims
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data model
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors Kill
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in Australia
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social media
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's Journey
 
Open by Default
Open by DefaultOpen by Default
Open by Default
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF Vocabularies
 

Recently uploaded

Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 

Recently uploaded (20)

Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 

Why Languages Matter 20090123

  • 1. One Ring to Rule Them All? Why Programming Languages Matter 1
  • 2. 2 Some people think, and act, like Java is the One Programming Language to Rule Them All. Is it really? Is it possible to have everything you need in a single language?
  • 3. TIOBE Programming Community Index 1 Java 19.002% 2 C 15.931% 3 C++ 10.116% 4 (Visual) Basic 9.161% 5 PHP 8.882% 6 C# 5.609% 7 Python 4.731% 8 Perl 4.303% 9 JavaScript 3.360% 10 Delphi 3.303% January 2009 3 Interestingly, Ruby is #11 and is the only other language with greater than 3% reporting.
  • 4. 4 From a Cadbury chocolate label. Simple things, like this list of ingredients, are relatively easy to translate. Concepts, logic and emotions are much harder.
  • 5. 5 Sandburg reminds us that language, like culture, is always changing. What we mean when we use a particular word evolves and changes. Consider the word “flour”, for example. In the Middle English of the Canterbury Tales, it means a flower. Nowadays it typically means ground wheat.
  • 6. “if something can't be said, then it can't be thought” -- Orwell 6 In George Orwell’s 1984, NewSpeak was an attempt to control what people could think by controlling what they could say. Can you think of analogies to computer programming languages that you use?
  • 7. 7 These are obviously shoes. They have dierent shapes, colors, sizes and styles, yet we immediately recognize them as shoes. Some languages insist on attaching implicit metadata about objects, such as gender (e.g. German, Italian) or even general shape (e.g. Japanese, -mai, -hon forms as in “kutsu ni-hon”). Consider also the dierence between material types in English (“some sand” vs. “a sand”).
  • 8. 8 When does an object become a shoe? Or stop being a shoe? We often pretend that our words have hard, Boolean meanings, but they are really quite flexible. This strongly dierentiates human languages from programming languages.
  • 9. quot;The limits of my language mean the limits of my world.quot; -- Wittgenstein 9 Ludwig Wittgenstein (1889–1951) was “an Austrian-British philosopher who worked primarily in logic, the philosophy of mathematics, the philosophy of mind, and the philosophy of language”. [Wikipedia]
  • 10. quot;About what one can not speak, one must remain silent.quot; -- Wittgenstein 10
  • 11. quot;The structures of your language shape the way you think and perceive the world.quot; - Sapir-Whorf Hypothesis 11 Cognitive research has proven a link from language to perception, but it seems to be weaker in adults. The “strength” of the Sapir-Whorf is an area of controversy [http://scienceblogs.com/ cognitivedaily/2005/05/does_our_language_aect_our_t.php]
  • 12. Language is innate and universal - Chomsky 12 Noam Chomsky (1928-) is an American linguist, philosopher, cognitive scientist, political activist, author, and lecturer. [Wikipedia]
  • 13. quot;Some people argue that language just changes what you attend to, but what you attend to changes what you encode and remember.quot; -- Lera Boroditsky 13 Lera Boroditsky is an Assistant Professor of Psychology at Stanford University doing research in cognitive science with a specific focus on cognitive linguistics. [Wikipedia]
  • 14. 14 Perhaps there is no “one ring”. Perhaps the ring is made of many possible components, or maybe even fractal...
  • 15. Chimeric Programming 15 Chimeric programming; like the mythical Chimera which was a beast made of parts of many animals (related to the Hydra and Cerberus). Chimera on a red-figure Apulian plate, ca 350-340 BCE (Musée du Louvre) -- Wikipedia Use many languages to say the right thing at the right time.
  • 16. Kinnersley’s Categories Constraint Procedural Object-Oriented Imperative Concurrent Declarative Fourth Generation Applicative Query Functional Specification Definitional Assembly Single Assignment Intermediate Dataflow Metalanguage Logic 16 Bill Kinnersley, husband of a University of Kansas EE prof and coder. He maintains the list of computer languages at http://people.ku.edu/~nkinners/LangList/Extras/langlist.htm
  • 17. Kinnersley’s Categories Java, Javascript Object-Oriented BeanShell Procedural Constraint Imperative Declarative HTML, CSS Concurrent Fourth Generation Applicative Functional XSL, RelaxNG Query SQL Specification Definitional Assembly Single Assignment Dataflow DPML Intermediate Metalanguage XML, BNF Logic 17 Languages used for the PURL project, notionally written in Java.
  • 18. Kinnersley’s Categories Java Object-Oriented Javascript Procedural Constraint Imperative Declarative HTML, CSS Concurrent Fourth Generation Applicative XSL, XPath Query SPARQL Functional XQuery Specification Definitional Assembly Single Assignment Dataflow Drools, DPML Intermediate Logic OWL, SKOS Metalanguage RDF, XML 18 Languages used for the ICFS project, also notionally a Java project.
  • 19. 19 Language features - bells and whistles you should note.
  • 20. Typing Dynamic Static Strong Ruby/Groovy Java/C# Weak JavaScript/Perl C/C++ From Venkat Subramaniam’s “Programming Groovy” 20 We used to snub our noses over dynamic languages over features like weak typing. The situation has changed and we should acknowledge that.
  • 21. Dynamic/Strong Ruby $ irb i = 10 = 10 s = quot;stringquot; = quot;stringquot; s + i TypeError: can't convert Fixnum into String from (irb):3:in `+' from (irb):3 from :0 From Nate Schutta’s “JavaScript : The Good, The Bad and the Ugly” 21
  • 22. Dynamic/Weak JavaScript var i = 12; var j = quot;helloquot;; out(i + j) Yields: “12 hello” From Nate Schutta’s “JavaScript : The Good, The Bad and the Ugly” 22
  • 23. Closures • Functions that are evaluated in an environment containing one or more bound variables. • Associated with functional languages. • Some OO languages now exposing closures for use by programmers - they appear as closed anonymous functions. 23 Closures may be used to implement OO (because state can be hidden and variables maintain state across calls). Example later.
  • 24. Metaprogramming • Code that writes code at runtime to perform operations traditionally performed at compile time. • Typically via dynamic execution of string expressions that contain programming commands. 24 Example later.
  • 25. Expando Metaclass Dynamically add • methods • constructors • properties • static methods to classes using closures. 25 Example later.
  • 26. 26 The language market is crowded; roughly 2,000 programming languages created in the last four decades (some 13 of which have “stuck”). Here are some you should know.
  • 27. Lisp (is back!) Functional • Conditionals • Program as expression • Functions as data • Symbol type • Recursion • Code as tree of symbols • Dynamic typing • Read/Run/Compile • Garbage collection http://www.paulgraham.com/icad.html 27 Also, LISP-variant Clojure for concurrent programming. Clojure runs on the JVM.
  • 28. Scala OO/Functional • Pattern matching • Comprehensions • Currying • Mixins 28
  • 29. Haskell Functional • Pattern matching • Currying • List comprehensions • Lazy evaluations • Monads • Type classes 29
  • 30. Erlang Functional • High-performance concurrency • Fault-tolerant • Hot-swappable 30
  • 31. Ericsson AXD 301 HA ATM Switch 1,000,000 Erlang LOC Used Not Used Message-passing Inheritance Isolation Methods Concurrency Classes Higher-Order Programming UML 31 Written in Erlang, now FLOSS. No traditionally OO structures used!
  • 32. JavaScript Dynamic OO • Prototype Inheritance • Closures • Function as a data type 32 Web 2.0 engine - dynamic language of choice in the Web browser, also on a JVM via Rhino.
  • 33. Ruby Dynamic OO/Functional • Metaprogramming • Rails engine! • Mixins 33 Runs on JVM “Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at runtime that would otherwise be done at compile time.” [Wikipedia]
  • 34. Groovy Dynamic OO - The next Java syntax? • Closures • Metaprogramming • Grails engine! • Builder Syntax (XML, Swing, Data) • Access to legacy Java code 34 Runs on JVM
  • 35. // By Scott Davis, Brian Sletten class FoafPerson { Map facts = [:] Object invokeMethod(String predicate, Object value) { if(facts.containsKey(predicate)) { value.each{ obj - facts.get(predicate).add(obj) } } else { facts.put(predicate, value as List) } } } 35 Invoking the method that wasn’t there.
  • 36. brian = new FoafPerson() brian.'foaf:name' 'Brian Sletten' brian.'foaf:knows' quot;Ericquot;, quot;Davidquot;,quot;Uchequot; brian.'foaf:dateOfBirth' '1972-05-26' brian.'foaf:interest' quot;http://www.w3.org/RDF/quot;, quot;http:// www.w3.org/2000/01/sw/quot; 36 Using the method that wasn’t there.
  • 37. String.metaClass.get = { context - def req = context.createSubRequest(quot;active:httpGetquot;) req.addArgument(quot;urlquot;, delegate) req.setAspectClass(IAspectString.class) def resp = context.issueSubRequestForAspect(req) return resp.getString() } . . . def foaf = “http://zepheira.com/team/brian/brian.rdf”.get(context) 37 Expando metaclass
  • 38. 38 Don’t be an angry monkey (in the learned behavior study sense) - question group think inherent in language choice.
  • 39. Photos Title Ring http://www.flickr.com/photos/mk1971/1348204498/ One Ring http://www.flickr.com/photos/generalnoir/391009102/ Language http://www.flickr.com/photos/margolove/1526032187/ Cadbury http://www.flickr.com/photos/nofrills/10895361/ Fractal http://www.flickr.com/photos/swaymedia/84294191/ Monkey http://www.flickr.com/photos/oskarn/122047239/ 1984 http://www.newspeakdictionary.com/go-movie.html http://www.flickr.com/photos/visualgrammar/ Shoes 114831391/ http://www.flickr.com/photos/undercover_surrealist/ Bottles 2405406526/ 39
  • 40. Photos Crowd http://www.flickr.com/photos/vividbreeze/480057824/ Bells http://www.flickr.com/photos/hirsuteursus/637705224/ Quotes Orwell 1984 On Language Collected by Brian Sletten Others as noted inline 40