sather vs java §brian oh §ann win. l introduction (of sather) l history (of sather) l comparison...

16
Sather vs Java Brian Oh Ann Win

Upload: walter-bennett

Post on 16-Jan-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

Sathervs

Java

Brian OhAnn Win

Page 2: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

Introduction (of Sather) History (of Sather)

Comparison between Java and Sather Sample - “Hello World”

Future (of Sather) For more info....

Page 3: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

IntroductionSather is an object oriented languageIt was designed to be simple, efficient, safe

and non-proprietary.Sather aims to meet the needs of modern

research groups and to foster the development of a large, freely available, high-quality library of efficient well-written classes for a wide variety of computational tasks.

Page 4: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

History

Sather was developed at the International Computer Science Institute, a research institute affiliated with the CS department of UC Berkeley.

Sather language got its name from the Sather Tower (popularly known as the Campanile), the best-known landmark on UC Berkeley.

Page 5: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

History

Initial Sather compiler (ver 0) was written in summer of 1990.

ICSI made Sather (ver 0.1) publicly available on June of 1991.

Ver 0.2 and 0.5 followed.Sather 1.0 was released in 1994, and most of the

major features such as bound routines and iteration, etc was first introduced in this version

Latest version is Sather 1.1, released the summer of 1996.

Page 6: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

History

Sather was originally designed and implemented by Steve Omohundro, David Stoutamire and (later) Robert Griesemer. Boris Vaysman is the current Sather feature implementor.

Sather has adopted ideas from Eiffel. But it has also been influenced by C, C++, Cecil, CLOS, CLU, Common Lisp, Dylan, ML, Modula-3, Oberon, Objective C, Pascal, SAIL, School, Self, and SmallTalk.

Page 7: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

ComparisonObject Oriented Programming

Like Java, Sather is object oriented. All entities in Sather are objects, and objects

are defined by classes. Some basic classes ( INT, FLT, STR). These

represents integers, floating point numbers, and strings.

Ex) Javafloat a=3.0;int b =5;String c = “foo”;

Ex) Sathera:FLT := 3.0;b:INT := 5;c:STR := “foo”;

Page 8: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

ComparisonGarbage collection

Like Java, Sather collects garbage automatically.

The runtime system does this automatically when it is safe to do so. But Sather does allow the programmer to manually deallocate objects, letting the garbage collector handle the remainder.

Sather applications generate far less garbage than typical SmallTalk or Lisp Programs.

Page 9: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

ComparisonStrong Type Language

Like Java, Sather is a (statically-checked) strong type language.

Sather is contravariant. That means that it isn’t possible to get type errors at runtime. It also means that the Sather programmer needs to insert explicit type checks (using a typecase) in places where a covariant compiler would have inserted an implicit check for you.

Page 10: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

ComparisonNo implicit Calls

Like Java, Sather does explicit method declarations.

Sather does as little as possible behind the user’s back at runtime. Meaning, there is no implicitly constructed temp objects.

Also Sather never converts types implicitly, such as from integer to character, integer to floating point, single to double precision, or subclass to superclass.

Page 11: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

ComparisonRobustness .. Why? Java and Sather both

has characteristics of .... no pointer, eliminates of a overwriting of

memory and corrupting data automatic garbage collection Strong type language, allows extensive

compile-time checking explicit method declarations good exception handling

Page 12: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

ComparisonReasons for using Java over Sather

Java is very popular... distributed so that TCP/IP, networking is easier architecture neutral.. Java can use same code on

many machines while, Sather can not multithreaded can be done easier.. Java does

multithreading on application level and not at the operating system level.. So it is a lot easier to do multithreading with Java then Sather.

Page 13: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

ComparisonReasons for using Sather over Java

Itegrators .. These methods encapsulate user defined looping control structures, with creation, increment and termination check.

Sather is as efficient as C, C++, or Fortran, as elegant but safer than Eiffel or CLU, and support higher-order functions as well as Common Lisp, Scheme, or SmallTalk.. So it is great for wide variety of research related computational tasks.

It lets you use a large, freely available, high-quality of efficient well-written classes... Such as Laplace or Krylov matrix solver..

Page 14: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

Hello World Program

Class HELLO

is

main

is

#out + “Hello World!\n”;

end -- end of main

end; -- end of class HelloWorld

-------------------------------------------

cs -main HELLO -o hw hw.sa

prompt> hw

Hello World

public class HelloWorld

{

public static void main (String[] args)

{

System.out.println (“Hello World”);

} //end of main

} // end of class HelloWorld

-------------------------------------------------

javac HelloWorld.java

prompt> java HelloWorld

Hello World

Page 15: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

Future of Sather

?? ??

Sather will be around but it will not be as popular as Java, C, C++ or Fortran.

?? ??

Page 16: Sather vs Java §Brian Oh §Ann Win. l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future

For more infovisit

http://www.icsi.berkeley.edu/Sather

or e-mail

[email protected]

or subscribe the news group

comp.lang.sather