SlideShare uma empresa Scribd logo
1 de 46
Introduction Suresh B Velagapudi, Ph.D Chief Technical Officer Mayera Software Solutions, LLC
Scalastic Warning “ Prolog Technology for temporal reasoning in relational databases” In spite of  Ph.D for the above research work,  I love to code in and talk about scala. I warn you up front  that Your present coding style is at risk.
Scala as a Practical Declarative Language
Weltanschauung Based on Peace, Practicality and Productivity Not on Power, Pride, Prejudice or Prosperity etc.
In A Nutshell Declarative Programming Style in Scala makes software product development from Proof-of-Concept to Deployment enjoyable.
Abbreviations MOD –  Martin ODersky DOS – Designer Of Scala SBE – Scala By Example ASS96 – Abelson Sussman Sussman MIL78 – Milner COW – Check Out Wikipedia DOP – A Discipline Of Programming 1976
Ramanujan scala>  for  {hardyTaxi <- List.range(1000,2000) j <- List.range(1,20) k <- List.range(1,20) l <- List.range(1,20) m <- List.range(1,20) if((j*j*j)+(k*k*k) == hardyTaxi && (l*l*l)+(m*m*m) == hardyTaxi) && j!= l && k!= m && j!= m}  yield  (i,j,k,l,m) res2: List[(Int, Int, Int, Int, Int)] = List((1729,1,12,9,10) The smallest number expressible as the sum of two cubes in two different ways.
Dijkstra on non-imperative in 1985 The simplest way to characterize the difference between imperative programming languages and non-imperative ones is that in the reasoning about imperative programming you have to be aware of the 'state' of the machine as is recorded in its memory.
An expression is non-imperative scala> if(12*12*12 + 1*1*1 == 10*10*10 + 9*9*9) 1729 else false res5: AnyVal = 1729 scala> if(12*12*12 + 1*1*1 == 10*10*10 + 9*9*9) 1729 else 0 res6: Int = 1729
Declarative Programs are Executable Specifications //from SBE page 72 def isPrime(n: Int) = List.range(2, n) forall (x => n % x != 0) //from SBE page 80 for { i <- List.range(1,10) j <- List.range(1, i) if isPrime(i+j) } yield (i, j)
Pythagorean tuple that sums to 1000 for  {i <- List.range(1,1000) j <- List.range(1,1000) k <- List.range(1,1000) if (i+j+k==1000 && i*i + j*j == k*k) }  yield  (i, j, k) res6: List[(Int, Int, Int)] = List((200,375,425), (375,200,425))
Declarative Reading is  Math Definition The definition of  isPrime   n ,  an integer ,  is,  given a range of integers 2 thru   n  for all X,  n  modulo  x  is not zero def fact(n: Int): Int =  n*fact(n-1) def isPrime(n: Int) = List.range(2, n) forall (x => n % x != 0) The definition of  factorial   n ,  an integer ,  is,  n   times   factorial  n -1
Separation of Concerns – Dijkstra We should not head for a mathematically correct program that is so badly engineered that is beyond salvation. --Dijkstra (1976) A Discipline of Programming
Recursion vs iteration //recursive procedure (described in ALGOL 60 ): procedure  whiledo (condition, statement);  begin if  condition  then begin  statement;  whiledo (condition, statement);  end end   Although correct, it hurts me. DOP Preface
A Generation Later // SBE page 6 def While (p: => Boolean) (s: => Unit) { if (p) { s ; While(p)(s) } } Later generations will pronounce as their judgment that  in the last fifteen years, recursive solutions have been placed upon too high a pedestal. DOP 178
Thank You Samar Singh My math comp mentor of late seventies and early eighties.
Tail Recursive Functions //SBE page 18 def gcd(a: Int, b: Int): Int = if (b == 0) a else  gcd(b,a % b)   /Answer to Exercise 4.6.1 of SBE page 19 def  mf (x: Int): Int =  myf (x, 1); def  myf (x:Int, Acc: Int): Int  =  if(x==1) Acc else myf(x-1, Acc * x)
Horner's rule def horner(L:List[Int], X : Int): Int = { def horneri(L:List[Int], X : Int,Acc: Int): Int = { if(L.isEmpty) Acc  else  horneri(L.tail,X, Acc*X + L.head)} horneri(L,X,0)}
Internal Rate of Return internal rate of return for an investment is the discount rate that makes the net present value of the investment's cash flow stream equal to zero.
Hilbert's Tenth Problem Determination of the solvability of a  Diophantine equation. Given a Diophantine equation with any number of unknown quantities and with rational integral numerical coefficients: To devise a process according to which it can be determined by a finite number of operations whether the equation is solvable in rational integers. A Diophantine equation  is a  polynomial   equation  where the variables are  integers  only.
An Oxymoron in 1989? Programming is essentially procedural. Real Engineers program by FORTRAN Arrays, or C pointers. Philosophers and Logicians make Declarations. Ha! Ha!
A Syllogism All humans are mortal. Socrates is human. So Socrates is mortal. Ha! Ha!
Modus Ponens  in PROLOG //All humans are mortal. mortal(X) :-  human(X). //Socrates is human. human( socrates ). human( suresh). ?- human(X). X = socrates ?- mortal(X). X = socrates  ; X = suresh.
Second Order Predicate ?- setof(X,mortal(X),List). List = [socrates, suresh]
Concatenation of Lists The concatenation of an empty list with a list L  is L. The Concatenation of a list having  head H and tail T,  with a list L,  is a list with head H and a tail that is the concatenation of T and L. concatenation([], L, L). concatenation([H|T], L, [H|CTL])  :-  concatenation(T,L, CTL). ?- concatenation([socrates,suresh],[addanki],L). L = [socrates,suresh,addanki] CTL H T L
Concatenation in Scala def concatenation[G](xs: List[G], ys: List[G]):  List[G] = xs match { case List() => ys   case H :: T => H :: concatenation(T,L) } CTL H T L
Predicate Logic as a Programming Language – Kowalski (1974) Program is a set of axioms. Computation is a constructive proof of a goal statement from the program
Thanks to Trevor Legall First theory book in 1984 Foundations of Logic Programming By J.W.Lloyd
Floating Point Number Crunching is not the only game in computingville. Combining qualitative reasoning and quantitative Techniques to  improve mechanical and electrical Product design.
Newton's method def sqrt(x: Double) = { def sqrtIter(guess: Double, x: Double): Double = if  (isGoodEnough(guess, x)) guess else  sqrtIter(improve(guess, x), x) def improve(guess: Double, x: Double) = (guess + x / guess) / 2 def isGoodEnough(guess: Double, x: Double) = abs(square(guess) - x) < 0.001 sqrtIter(1.0, x) }
Algorithms + Data Structures = Programs That was my fault. I included it because I liked it, and that for two reasons: 1. (z /: xs) (op) looks like an abbreviation of a left leaning tree with a `z' on the lower left end (at least to me). I.e. something like op /   op  x1 /   z  x0  That's the tree I always draw when I explain fold left. 2. (z /: xs) has the operands in the ``right'' order.
Algorithm = Logic + Control The logic component determines the meaning of the algorithm. The control component only affects its efficiency.
Algorithm Logic component Abstract Procedure Definitions Definitions of data structures represented by terms Direction e.g. (top-down or bottom-up) Strategy for execution of procedure calls (e.g. sequential or parallel Strategy for investigating alternative procedures Control component Scheme for storing data represented relationally
Which  Factorial Program? def fact(n: Int) = 1 to n reduceLeft (_*_)  def fact(n: Int):Int =  If (n == 0) 1  else n * fact(n-1) def mf(x: Int): Int = myf(x, 1); def myf(x:Int, Acc: Int): Int  =  if(x==1) Acc  Else myf(x-1, Acc * x)
Which Reverse? //SBE page 68 def reverse[A](xs: List[A]): List[A] = xs match  case Nil => Nil  case x :: xs => reverse(xs) ::: List(x)} //SBE page 75 def reverse: List[A] = ((Nil: List[A]) /: this) {(xs, x) => x :: xs} //Is Tail Recursive Reverse Possible?
Tail Recursive Reverse def reverse[T](l: List[T]): List[T] = { def reverseR(result: List[T], curList: List[T]): List[T] = curList match { case Nil  => result case h :: tail => reverseR(h :: result, tail) } reverseR(Nil, l) }
Sample Conversation with ELIZA I am unhappy. >> How long have you been unhappy? Six months. Can you help me. >> What makes you think I  help you? You remind me of my father and brother >>Please tell me more about father. I like teasing father. >>Does anyone else in your family like teasing father? No, only me. >> Please go on
ELIZA in Scala def response(stimulus : List[String]) :  Unit = stimulus match { case List(&quot;i&quot;,&quot;am&quot;, x) => println(&quot;How long have  you been&quot; + x+ &quot;?&quot;) case List(x, &quot;you&quot;, y, &quot;me&quot;) => println(&quot;What  makes you think I &quot; +y+&quot; you?&quot;) case List(&quot;i&quot;,&quot;feel&quot;, x) => println(&quot;Do you often  feel that way?&quot;) case List(&quot;i&quot;, &quot;like&quot;, x)  => println(&quot;Does any one  else in your family like &quot; + x +&quot; ?&quot;) case _ => println(&quot;Please Go On&quot;) }
Machine Learning Suppose ELIZA wants to improve.  Weka switched to java from prolog. SWeka will be in Scala.
Future of Scala Pessimistic Scenario: Functional freaks and java addicts fight to finish to scare away all scala enthusiasts. Optimistic Scenario: Complete Domination of the entire computing scene Most likely scenario:  Solid apps come up. Steady impressive growth for next decade.
Pollak's cpp Principle Each morning that I sit down at the keyboard and start coding Scala, I get a feeling of  calm, peace, and power.  I know that I’m going to have another day of taking the ideas in my head and reducing them to a running computer program that will be fast and low in defects.
Pollak  But most importantly, Scala taught me to program and reason about programming differently. I stopped thinking in terms of allocating buffers, structs, and objects, and of changing those pieces of memory. Instead, I learned to think about most of my programs as transforming input to output. This change in thinking has lead ( sic ) to lower defect rates, more modular code, and more testable code.
Tony Hoare in QCON 2009 One 
day
... • Software 
will 
be 
the 
most
 reliable
 component Of 
every 
product
 which
 contains 
it. • Software 
engineering
 will
 be
 the 
most Dependable 
of
 all 
engineering 
professions. • Because 
of 
the
 successful 
interplay
 of research – 
into
 the
 science 
of
 programming – and
 the
 engineering
 of
 software
I have a dream One day..... My fellow scalastics'  programs will be judged not by the colorful confusion of syntax  but by the content of the character sequences with  declarative semantics.
Remember  SURESH S emantics   independent of execution is the aim.  U niversal quantification is  for  stating facts and rules. R ecursion is natural and  efficient with TRO Call. E xtensive use of pattern matching  is desirable. S tatic typing of generics avoids awful defects.   H igher order functions  help declarative programming.
The End Thank You

Mais conteúdo relacionado

Mais procurados

Sierpinski Triangle - Polyglot FP for Fun and Profit - Haskell and Scala
Sierpinski Triangle - Polyglot FP for Fun and Profit - Haskell and ScalaSierpinski Triangle - Polyglot FP for Fun and Profit - Haskell and Scala
Sierpinski Triangle - Polyglot FP for Fun and Profit - Haskell and ScalaPhilip Schwarz
 
Monoids - Part 1 - with examples using Scalaz and Cats
Monoids - Part 1 - with examples using Scalaz and CatsMonoids - Part 1 - with examples using Scalaz and Cats
Monoids - Part 1 - with examples using Scalaz and CatsPhilip Schwarz
 
Introducing Assignment invalidates the Substitution Model of Evaluation and v...
Introducing Assignment invalidates the Substitution Model of Evaluation and v...Introducing Assignment invalidates the Substitution Model of Evaluation and v...
Introducing Assignment invalidates the Substitution Model of Evaluation and v...Philip Schwarz
 
Applicative Functor - Part 3
Applicative Functor - Part 3Applicative Functor - Part 3
Applicative Functor - Part 3Philip Schwarz
 
The Functional Programming Triad of Folding, Scanning and Iteration - a first...
The Functional Programming Triad of Folding, Scanning and Iteration - a first...The Functional Programming Triad of Folding, Scanning and Iteration - a first...
The Functional Programming Triad of Folding, Scanning and Iteration - a first...Philip Schwarz
 
Monad Transformers - Part 1
Monad Transformers - Part 1Monad Transformers - Part 1
Monad Transformers - Part 1Philip Schwarz
 
The Functional Programming Triad of Folding, Scanning and Iteration - a first...
The Functional Programming Triad of Folding, Scanning and Iteration - a first...The Functional Programming Triad of Folding, Scanning and Iteration - a first...
The Functional Programming Triad of Folding, Scanning and Iteration - a first...Philip Schwarz
 
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...Philip Schwarz
 
Abstracting over the Monad yielded by a for comprehension and its generators
Abstracting over the Monad yielded by a for comprehension and its generatorsAbstracting over the Monad yielded by a for comprehension and its generators
Abstracting over the Monad yielded by a for comprehension and its generatorsPhilip Schwarz
 
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2Philip Schwarz
 
Scala 3 enum for a terser Option Monad Algebraic Data Type
Scala 3 enum for a terser Option Monad Algebraic Data TypeScala 3 enum for a terser Option Monad Algebraic Data Type
Scala 3 enum for a terser Option Monad Algebraic Data TypePhilip Schwarz
 
Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture ThreeAngelo Corsaro
 

Mais procurados (20)

Sierpinski Triangle - Polyglot FP for Fun and Profit - Haskell and Scala
Sierpinski Triangle - Polyglot FP for Fun and Profit - Haskell and ScalaSierpinski Triangle - Polyglot FP for Fun and Profit - Haskell and Scala
Sierpinski Triangle - Polyglot FP for Fun and Profit - Haskell and Scala
 
Monoids - Part 1 - with examples using Scalaz and Cats
Monoids - Part 1 - with examples using Scalaz and CatsMonoids - Part 1 - with examples using Scalaz and Cats
Monoids - Part 1 - with examples using Scalaz and Cats
 
Introducing Assignment invalidates the Substitution Model of Evaluation and v...
Introducing Assignment invalidates the Substitution Model of Evaluation and v...Introducing Assignment invalidates the Substitution Model of Evaluation and v...
Introducing Assignment invalidates the Substitution Model of Evaluation and v...
 
Applicative Functor - Part 3
Applicative Functor - Part 3Applicative Functor - Part 3
Applicative Functor - Part 3
 
The Functional Programming Triad of Folding, Scanning and Iteration - a first...
The Functional Programming Triad of Folding, Scanning and Iteration - a first...The Functional Programming Triad of Folding, Scanning and Iteration - a first...
The Functional Programming Triad of Folding, Scanning and Iteration - a first...
 
Software Construction Assignment Help
Software Construction Assignment HelpSoftware Construction Assignment Help
Software Construction Assignment Help
 
Monad Transformers - Part 1
Monad Transformers - Part 1Monad Transformers - Part 1
Monad Transformers - Part 1
 
Programming with matlab session 1
Programming with matlab session 1Programming with matlab session 1
Programming with matlab session 1
 
Computer Science Assignment Help
Computer Science Assignment HelpComputer Science Assignment Help
Computer Science Assignment Help
 
The Functional Programming Triad of Folding, Scanning and Iteration - a first...
The Functional Programming Triad of Folding, Scanning and Iteration - a first...The Functional Programming Triad of Folding, Scanning and Iteration - a first...
The Functional Programming Triad of Folding, Scanning and Iteration - a first...
 
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...
 
Abstracting over the Monad yielded by a for comprehension and its generators
Abstracting over the Monad yielded by a for comprehension and its generatorsAbstracting over the Monad yielded by a for comprehension and its generators
Abstracting over the Monad yielded by a for comprehension and its generators
 
Matlab Tutorial
Matlab TutorialMatlab Tutorial
Matlab Tutorial
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2
 
Scala 3 enum for a terser Option Monad Algebraic Data Type
Scala 3 enum for a terser Option Monad Algebraic Data TypeScala 3 enum for a terser Option Monad Algebraic Data Type
Scala 3 enum for a terser Option Monad Algebraic Data Type
 
Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture Three
 
Functors
FunctorsFunctors
Functors
 
Matlab1
Matlab1Matlab1
Matlab1
 

Destaque

Introducing Pattern Matching in Scala
 Introducing Pattern Matching  in Scala Introducing Pattern Matching  in Scala
Introducing Pattern Matching in ScalaAyush Mishra
 
From Imperative to Functional Programming (for Absolute Beginners)
From Imperative to Functional Programming (for Absolute Beginners)From Imperative to Functional Programming (for Absolute Beginners)
From Imperative to Functional Programming (for Absolute Beginners)Alex Bunardzic
 
FUNCTIONS OF ENGLISH AS A LANGUAGE
FUNCTIONS OF ENGLISH AS A LANGUAGEFUNCTIONS OF ENGLISH AS A LANGUAGE
FUNCTIONS OF ENGLISH AS A LANGUAGEKarthika Shibu
 
Personality Development ppt by Taher Salim INDORE
Personality Development ppt by Taher Salim INDOREPersonality Development ppt by Taher Salim INDORE
Personality Development ppt by Taher Salim INDORETaher Salim
 
Language functions and notions
Language functions and notionsLanguage functions and notions
Language functions and notionsIan Lao
 
Language functions
Language functionsLanguage functions
Language functionsSyeda Baneen
 

Destaque (6)

Introducing Pattern Matching in Scala
 Introducing Pattern Matching  in Scala Introducing Pattern Matching  in Scala
Introducing Pattern Matching in Scala
 
From Imperative to Functional Programming (for Absolute Beginners)
From Imperative to Functional Programming (for Absolute Beginners)From Imperative to Functional Programming (for Absolute Beginners)
From Imperative to Functional Programming (for Absolute Beginners)
 
FUNCTIONS OF ENGLISH AS A LANGUAGE
FUNCTIONS OF ENGLISH AS A LANGUAGEFUNCTIONS OF ENGLISH AS A LANGUAGE
FUNCTIONS OF ENGLISH AS A LANGUAGE
 
Personality Development ppt by Taher Salim INDORE
Personality Development ppt by Taher Salim INDOREPersonality Development ppt by Taher Salim INDORE
Personality Development ppt by Taher Salim INDORE
 
Language functions and notions
Language functions and notionsLanguage functions and notions
Language functions and notions
 
Language functions
Language functionsLanguage functions
Language functions
 

Semelhante a Scala as a Declarative Language

CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVSCBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVSGautham Rajesh
 
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...Philip Schwarz
 
Functional programming ii
Functional programming iiFunctional programming ii
Functional programming iiPrashant Kalkar
 
High-Performance Haskell
High-Performance HaskellHigh-Performance Haskell
High-Performance HaskellJohan Tibell
 
Fp in scala part 2
Fp in scala part 2Fp in scala part 2
Fp in scala part 2Hang Zhao
 
JBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersJBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersTikal Knowledge
 
Python quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung FuPython quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung Fuclimatewarrior
 
talk at Virginia Bioinformatics Institute, December 5, 2013
talk at Virginia Bioinformatics Institute, December 5, 2013talk at Virginia Bioinformatics Institute, December 5, 2013
talk at Virginia Bioinformatics Institute, December 5, 2013ericupnorth
 
Ejercicios de estilo en la programación
Ejercicios de estilo en la programaciónEjercicios de estilo en la programación
Ejercicios de estilo en la programaciónSoftware Guru
 
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021Peng Cheng
 
Rewriting Java In Scala
Rewriting Java In ScalaRewriting Java In Scala
Rewriting Java In ScalaSkills Matter
 
Introduction to R programming
Introduction to R programmingIntroduction to R programming
Introduction to R programmingAlberto Labarga
 
C Programming Interview Questions
C Programming Interview QuestionsC Programming Interview Questions
C Programming Interview QuestionsGradeup
 
Haskell retrospective
Haskell retrospectiveHaskell retrospective
Haskell retrospectivechenge2k
 
Poetry with R -- Dissecting the code
Poetry with R -- Dissecting the codePoetry with R -- Dissecting the code
Poetry with R -- Dissecting the codePeter Solymos
 
Столпы функционального программирования для адептов ООП, Николай Мозговой
Столпы функционального программирования для адептов ООП, Николай МозговойСтолпы функционального программирования для адептов ООП, Николай Мозговой
Столпы функционального программирования для адептов ООП, Николай МозговойSigma Software
 
Functional Programming by Examples using Haskell
Functional Programming by Examples using HaskellFunctional Programming by Examples using Haskell
Functional Programming by Examples using Haskellgoncharenko
 

Semelhante a Scala as a Declarative Language (20)

CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVSCBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
 
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...
 
Functional programming ii
Functional programming iiFunctional programming ii
Functional programming ii
 
High-Performance Haskell
High-Performance HaskellHigh-Performance Haskell
High-Performance Haskell
 
R Language Introduction
R Language IntroductionR Language Introduction
R Language Introduction
 
Fp in scala part 2
Fp in scala part 2Fp in scala part 2
Fp in scala part 2
 
JBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersJBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java Programmers
 
Python quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung FuPython quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung Fu
 
talk at Virginia Bioinformatics Institute, December 5, 2013
talk at Virginia Bioinformatics Institute, December 5, 2013talk at Virginia Bioinformatics Institute, December 5, 2013
talk at Virginia Bioinformatics Institute, December 5, 2013
 
Ejercicios de estilo en la programación
Ejercicios de estilo en la programaciónEjercicios de estilo en la programación
Ejercicios de estilo en la programación
 
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
 
Rewriting Java In Scala
Rewriting Java In ScalaRewriting Java In Scala
Rewriting Java In Scala
 
Introduction to R programming
Introduction to R programmingIntroduction to R programming
Introduction to R programming
 
Scala @ TomTom
Scala @ TomTomScala @ TomTom
Scala @ TomTom
 
C Programming Interview Questions
C Programming Interview QuestionsC Programming Interview Questions
C Programming Interview Questions
 
Haskell retrospective
Haskell retrospectiveHaskell retrospective
Haskell retrospective
 
Poetry with R -- Dissecting the code
Poetry with R -- Dissecting the codePoetry with R -- Dissecting the code
Poetry with R -- Dissecting the code
 
Столпы функционального программирования для адептов ООП, Николай Мозговой
Столпы функционального программирования для адептов ООП, Николай МозговойСтолпы функционального программирования для адептов ООП, Николай Мозговой
Столпы функционального программирования для адептов ООП, Николай Мозговой
 
Jeop game-final-review
Jeop game-final-reviewJeop game-final-review
Jeop game-final-review
 
Functional Programming by Examples using Haskell
Functional Programming by Examples using HaskellFunctional Programming by Examples using Haskell
Functional Programming by Examples using Haskell
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Scala as a Declarative Language

  • 1. Introduction Suresh B Velagapudi, Ph.D Chief Technical Officer Mayera Software Solutions, LLC
  • 2. Scalastic Warning “ Prolog Technology for temporal reasoning in relational databases” In spite of Ph.D for the above research work, I love to code in and talk about scala. I warn you up front that Your present coding style is at risk.
  • 3. Scala as a Practical Declarative Language
  • 4. Weltanschauung Based on Peace, Practicality and Productivity Not on Power, Pride, Prejudice or Prosperity etc.
  • 5. In A Nutshell Declarative Programming Style in Scala makes software product development from Proof-of-Concept to Deployment enjoyable.
  • 6. Abbreviations MOD – Martin ODersky DOS – Designer Of Scala SBE – Scala By Example ASS96 – Abelson Sussman Sussman MIL78 – Milner COW – Check Out Wikipedia DOP – A Discipline Of Programming 1976
  • 7. Ramanujan scala> for {hardyTaxi <- List.range(1000,2000) j <- List.range(1,20) k <- List.range(1,20) l <- List.range(1,20) m <- List.range(1,20) if((j*j*j)+(k*k*k) == hardyTaxi && (l*l*l)+(m*m*m) == hardyTaxi) && j!= l && k!= m && j!= m} yield (i,j,k,l,m) res2: List[(Int, Int, Int, Int, Int)] = List((1729,1,12,9,10) The smallest number expressible as the sum of two cubes in two different ways.
  • 8. Dijkstra on non-imperative in 1985 The simplest way to characterize the difference between imperative programming languages and non-imperative ones is that in the reasoning about imperative programming you have to be aware of the 'state' of the machine as is recorded in its memory.
  • 9. An expression is non-imperative scala> if(12*12*12 + 1*1*1 == 10*10*10 + 9*9*9) 1729 else false res5: AnyVal = 1729 scala> if(12*12*12 + 1*1*1 == 10*10*10 + 9*9*9) 1729 else 0 res6: Int = 1729
  • 10. Declarative Programs are Executable Specifications //from SBE page 72 def isPrime(n: Int) = List.range(2, n) forall (x => n % x != 0) //from SBE page 80 for { i <- List.range(1,10) j <- List.range(1, i) if isPrime(i+j) } yield (i, j)
  • 11. Pythagorean tuple that sums to 1000 for {i <- List.range(1,1000) j <- List.range(1,1000) k <- List.range(1,1000) if (i+j+k==1000 && i*i + j*j == k*k) } yield (i, j, k) res6: List[(Int, Int, Int)] = List((200,375,425), (375,200,425))
  • 12. Declarative Reading is Math Definition The definition of isPrime n , an integer , is, given a range of integers 2 thru n for all X, n modulo x is not zero def fact(n: Int): Int = n*fact(n-1) def isPrime(n: Int) = List.range(2, n) forall (x => n % x != 0) The definition of factorial n , an integer , is, n times factorial n -1
  • 13. Separation of Concerns – Dijkstra We should not head for a mathematically correct program that is so badly engineered that is beyond salvation. --Dijkstra (1976) A Discipline of Programming
  • 14. Recursion vs iteration //recursive procedure (described in ALGOL 60 ): procedure whiledo (condition, statement); begin if condition then begin statement; whiledo (condition, statement); end end Although correct, it hurts me. DOP Preface
  • 15. A Generation Later // SBE page 6 def While (p: => Boolean) (s: => Unit) { if (p) { s ; While(p)(s) } } Later generations will pronounce as their judgment that in the last fifteen years, recursive solutions have been placed upon too high a pedestal. DOP 178
  • 16. Thank You Samar Singh My math comp mentor of late seventies and early eighties.
  • 17. Tail Recursive Functions //SBE page 18 def gcd(a: Int, b: Int): Int = if (b == 0) a else gcd(b,a % b) /Answer to Exercise 4.6.1 of SBE page 19 def mf (x: Int): Int = myf (x, 1); def myf (x:Int, Acc: Int): Int = if(x==1) Acc else myf(x-1, Acc * x)
  • 18. Horner's rule def horner(L:List[Int], X : Int): Int = { def horneri(L:List[Int], X : Int,Acc: Int): Int = { if(L.isEmpty) Acc else horneri(L.tail,X, Acc*X + L.head)} horneri(L,X,0)}
  • 19. Internal Rate of Return internal rate of return for an investment is the discount rate that makes the net present value of the investment's cash flow stream equal to zero.
  • 20. Hilbert's Tenth Problem Determination of the solvability of a Diophantine equation. Given a Diophantine equation with any number of unknown quantities and with rational integral numerical coefficients: To devise a process according to which it can be determined by a finite number of operations whether the equation is solvable in rational integers. A Diophantine equation is a polynomial equation where the variables are integers only.
  • 21. An Oxymoron in 1989? Programming is essentially procedural. Real Engineers program by FORTRAN Arrays, or C pointers. Philosophers and Logicians make Declarations. Ha! Ha!
  • 22. A Syllogism All humans are mortal. Socrates is human. So Socrates is mortal. Ha! Ha!
  • 23. Modus Ponens in PROLOG //All humans are mortal. mortal(X) :- human(X). //Socrates is human. human( socrates ). human( suresh). ?- human(X). X = socrates ?- mortal(X). X = socrates ; X = suresh.
  • 24. Second Order Predicate ?- setof(X,mortal(X),List). List = [socrates, suresh]
  • 25. Concatenation of Lists The concatenation of an empty list with a list L is L. The Concatenation of a list having head H and tail T, with a list L, is a list with head H and a tail that is the concatenation of T and L. concatenation([], L, L). concatenation([H|T], L, [H|CTL]) :- concatenation(T,L, CTL). ?- concatenation([socrates,suresh],[addanki],L). L = [socrates,suresh,addanki] CTL H T L
  • 26. Concatenation in Scala def concatenation[G](xs: List[G], ys: List[G]): List[G] = xs match { case List() => ys case H :: T => H :: concatenation(T,L) } CTL H T L
  • 27. Predicate Logic as a Programming Language – Kowalski (1974) Program is a set of axioms. Computation is a constructive proof of a goal statement from the program
  • 28. Thanks to Trevor Legall First theory book in 1984 Foundations of Logic Programming By J.W.Lloyd
  • 29. Floating Point Number Crunching is not the only game in computingville. Combining qualitative reasoning and quantitative Techniques to improve mechanical and electrical Product design.
  • 30. Newton's method def sqrt(x: Double) = { def sqrtIter(guess: Double, x: Double): Double = if (isGoodEnough(guess, x)) guess else sqrtIter(improve(guess, x), x) def improve(guess: Double, x: Double) = (guess + x / guess) / 2 def isGoodEnough(guess: Double, x: Double) = abs(square(guess) - x) < 0.001 sqrtIter(1.0, x) }
  • 31. Algorithms + Data Structures = Programs That was my fault. I included it because I liked it, and that for two reasons: 1. (z /: xs) (op) looks like an abbreviation of a left leaning tree with a `z' on the lower left end (at least to me). I.e. something like op / op x1 / z x0 That's the tree I always draw when I explain fold left. 2. (z /: xs) has the operands in the ``right'' order.
  • 32. Algorithm = Logic + Control The logic component determines the meaning of the algorithm. The control component only affects its efficiency.
  • 33. Algorithm Logic component Abstract Procedure Definitions Definitions of data structures represented by terms Direction e.g. (top-down or bottom-up) Strategy for execution of procedure calls (e.g. sequential or parallel Strategy for investigating alternative procedures Control component Scheme for storing data represented relationally
  • 34. Which Factorial Program? def fact(n: Int) = 1 to n reduceLeft (_*_) def fact(n: Int):Int = If (n == 0) 1 else n * fact(n-1) def mf(x: Int): Int = myf(x, 1); def myf(x:Int, Acc: Int): Int = if(x==1) Acc Else myf(x-1, Acc * x)
  • 35. Which Reverse? //SBE page 68 def reverse[A](xs: List[A]): List[A] = xs match case Nil => Nil case x :: xs => reverse(xs) ::: List(x)} //SBE page 75 def reverse: List[A] = ((Nil: List[A]) /: this) {(xs, x) => x :: xs} //Is Tail Recursive Reverse Possible?
  • 36. Tail Recursive Reverse def reverse[T](l: List[T]): List[T] = { def reverseR(result: List[T], curList: List[T]): List[T] = curList match { case Nil => result case h :: tail => reverseR(h :: result, tail) } reverseR(Nil, l) }
  • 37. Sample Conversation with ELIZA I am unhappy. >> How long have you been unhappy? Six months. Can you help me. >> What makes you think I help you? You remind me of my father and brother >>Please tell me more about father. I like teasing father. >>Does anyone else in your family like teasing father? No, only me. >> Please go on
  • 38. ELIZA in Scala def response(stimulus : List[String]) : Unit = stimulus match { case List(&quot;i&quot;,&quot;am&quot;, x) => println(&quot;How long have you been&quot; + x+ &quot;?&quot;) case List(x, &quot;you&quot;, y, &quot;me&quot;) => println(&quot;What makes you think I &quot; +y+&quot; you?&quot;) case List(&quot;i&quot;,&quot;feel&quot;, x) => println(&quot;Do you often feel that way?&quot;) case List(&quot;i&quot;, &quot;like&quot;, x) => println(&quot;Does any one else in your family like &quot; + x +&quot; ?&quot;) case _ => println(&quot;Please Go On&quot;) }
  • 39. Machine Learning Suppose ELIZA wants to improve. Weka switched to java from prolog. SWeka will be in Scala.
  • 40. Future of Scala Pessimistic Scenario: Functional freaks and java addicts fight to finish to scare away all scala enthusiasts. Optimistic Scenario: Complete Domination of the entire computing scene Most likely scenario: Solid apps come up. Steady impressive growth for next decade.
  • 41. Pollak's cpp Principle Each morning that I sit down at the keyboard and start coding Scala, I get a feeling of calm, peace, and power. I know that I’m going to have another day of taking the ideas in my head and reducing them to a running computer program that will be fast and low in defects.
  • 42. Pollak But most importantly, Scala taught me to program and reason about programming differently. I stopped thinking in terms of allocating buffers, structs, and objects, and of changing those pieces of memory. Instead, I learned to think about most of my programs as transforming input to output. This change in thinking has lead ( sic ) to lower defect rates, more modular code, and more testable code.
  • 43. Tony Hoare in QCON 2009 One 
day
... • Software 
will 
be 
the 
most
 reliable
 component Of 
every 
product
 which
 contains 
it. • Software 
engineering
 will
 be
 the 
most Dependable 
of
 all 
engineering 
professions. • Because 
of 
the
 successful 
interplay
 of research – 
into
 the
 science 
of
 programming – and
 the
 engineering
 of
 software
  • 44. I have a dream One day..... My fellow scalastics' programs will be judged not by the colorful confusion of syntax but by the content of the character sequences with declarative semantics.
  • 45. Remember SURESH S emantics independent of execution is the aim. U niversal quantification is for stating facts and rules. R ecursion is natural and efficient with TRO Call. E xtensive use of pattern matching is desirable. S tatic typing of generics avoids awful defects. H igher order functions help declarative programming.

Notas do Editor

  1. FORTRAN is the first language. 1969 Btech IITM Did Eco and finance too. Ms and Ph.D in computer science. Intend going from 50% to 100%
  2. That is my thesis title.
  3. Enjoy
  4. Read it after 15 years. In stone age of computing, from one stone inscription to the other takes a long time. I do not blame myself. Dijkstra is ignorant of it too,