Transcript What is Sather
Sather vs Java
Brian Oh Ann Win
Introduction (of Sather) History (of Sather) Comparison between Java and Sather Sample - “Hello World” Future (of Sather) For more info....
Introduction
Sather is an object oriented language It 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.
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.
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.
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.
Comparison
Object 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) Java float a=3.0; int b =5; String c = “foo”; Ex) Sather a:FLT := 3.0; b:INT := 5; c:STR := “foo”;
Comparison
Garbage 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.
Comparison
Strong 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.
Comparison
No 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.
Comparison
Robustness .. 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
Comparison
Reasons 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.
Comparison
Reasons 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..
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
Future of Sather
??
??
Sather will be around but it will not be as popular as Java, C, C++ or Fortran. ??
??
For more info
visit http://www.icsi.berkeley.edu/Sather or e-mail [email protected]
or subscribe the news group comp.lang.sather