|
home—lectures—exams—hws—D2L—breeze (snow day)
You can never understand one language until you understand at least two.
—John Searle
The limits of my language are the limits of my world.
—Ludwig Wittgenstein
Why study programming languages?
Discuss: You've used Java, and (others like) Ada, and javascript, and php, and C. What are features of Java you like, and when are you writing something where the language feels like it's getting in the way?
class Meme { File imageFile; // e.g. first-world-problem.jpg or mostInterestingManInTheWorld.gif String topText; String bottomText; } |
Writing this in racket, though, makes me think:
Hey,
Not as generally useful (!): because generalizing from 2 to an entire list (collection) is so much harder, other people haven't written handy library functions that can make use of this more general code!
This is a serious point: becase
What if you want to sort
Three ways to consider, in a language:
Families of languages:
Reading: Chapter 1, by Friday.
Note: Book; add/drop.
A history overview
name yr family feature(s)/notables (descendents/related) example TM, lambda calculus machine / hardware switches (incl. Babbage's Analytic Engine) assembly Lisp; Scheme, ML, Haskel, F# Fortran; PL/I; Algol; SmallTalk; C++, java, C# Ada; sh, csh, Tcl/Tk, perl, python, ruby rpn; postscript (printer is the interpreter; req'd M68000, not 8088,6502); pdf prolog (Japanese "4th wave") Basic (Apple II ROM; line#s; goto;'gosub' but no params (only globals) (recursion?!)), http://www.jenutech.com/images/HomeSweetGoto10.gif http://theinfosphere.org/File:Gotohell.jpg Pascal (teaching; nested procedures) language popularity index poster: programming languages history Thehello world collection - examples: enscript -o foo.ps (wimpout.ps) Example: enscript -o foo.ps ; cat foo.ps ; open foo.ps Example: cat wimpoutBoard.ps ; open wimpoutBoard.ps also, sh: Example: cd ~/Unix find . -name \*.ps -print find . -name \*.ps -print | grep -i wimpout - other notables: * postscript - C, Ada, Fortran, Pascal, Rexx, ... - Smalltalk, Java, C++, C#, ... - APL; Mathematica; Matlab - javascript, perl, etc; html ? -- no; data. But, .css. - sh/csh, .bat, applescript; scriptable photoshop? Example: cd ~/Unix find \*.ps find \*.ps | grep -i wimpout Note that we are calling functions. (How are arguments passed?) - a *programmable* calculator. * MS Word "macros" and mailing-list scripts - abacus-instructions ?
Link:
"A new language for phone networks" (declarative; based on F#)
www.technologyreview.com/communications/23330/?a=f
home—lectures—exams—hws—D2L—breeze (snow day)
©2013, Ian Barland, Radford University Last modified 2013.Aug.26 (Mon) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |