7. Scalability
Glueing Functions, Glueing Programs
Modularize
No Assignment
Referentially transparent
No Side Effect
Memory Management
Performance
Functional Programming
2010년 5월 6일 목요일
10. Scalable Language [Skah-lah]
The language is so named because it was
designed to grow with the demands of its users.
- Programming Scala, p3
2010년 5월 6일 목요일
11. Scala
Multi Paradigm ( OOP + FP )
Strength of variable languages
(Haskell, ML, Java, Earlang, Smalltalk ...)
Very Short Code : About 1/2 of Java Code
Increase Readability
Scalability
Type Inference ,Implicit Conversion
2010년 5월 6일 목요일
12. Simple Code
public class Person{
private String name;
public Person(String name){
self.name = name;
}
public String getName(){
return name;
}
public void setName(String
name){
self.name = name;
}
}
class Person(var name:String)
2010년 5월 6일 목요일
14. Higher-order Functions
def sum(f: Int => Int) (start:Int, end:Int): Int = {
if (start > end) 0
else f(start) + sum(f)(start + 1, end)
}
sum:((Int)=>Int)(Int,Int)Int
2010년 5월 6일 목요일
15. No Side Effects
Side Effect : 실 매개변수나 비지역변수의 값
이 바뀌어 의도하지 않았던 결과를 얻게 되는
현상
Call By Value
f(x) = y ( Referentially transparent)
Call By Reference
f(instance) = ? (Side Effect 가능성)
2010년 5월 6일 목요일
21. on
Reliable, high performance code
Flexible , Full featured Language
Steve Jenson, Alex Payne and Robey Pointer said…..
http://www.artima.com/scalazine/articles/twitter_on_scala.html
2010년 5월 6일 목요일