Download presentation
Presentation is loading. Please wait.
Published byWalter Bennett Modified over 9 years ago
1
Sather vs Java §Brian Oh §Ann Win
2
l Introduction (of Sather) l History (of Sather) l Comparison between Java and Sather l Sample - “Hello World” l Future (of Sather) l For more info....
3
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.
4
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.
5
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.
6
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.
7
Comparison §Object Oriented Programming l Like Java, Sather is object oriented. l All entities in Sather are objects, and objects are defined by classes. l 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”;
8
Comparison §Garbage collection l Like Java, Sather collects garbage automatically. l 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. l Sather applications generate far less garbage than typical SmallTalk or Lisp Programs.
9
Comparison §Strong Type Language l Like Java, Sather is a (statically-checked) strong type language. l 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.
10
Comparison §No implicit Calls l Like Java, Sather does explicit method declarations. l Sather does as little as possible behind the user’s back at runtime. Meaning, there is no implicitly constructed temp objects. l Also Sather never converts types implicitly, such as from integer to character, integer to floating point, single to double precision, or subclass to superclass.
11
Comparison §Robustness.. Why? Java and Sather both has characteristics of.... l no pointer, eliminates of a overwriting of memory and corrupting data l automatic garbage collection l Strong type language, allows extensive compile-time checking l explicit method declarations l good exception handling
12
Comparison Reasons for using Java over Sather l Java is very popular... l distributed so that TCP/IP, networking is easier l architecture neutral.. Java can use same code on many machines while, Sather can not l 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.
13
Comparison Reasons for using Sather over Java l Itegrators.. These methods encapsulate user defined looping control structures, with creation, increment and termination check. l 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. l It lets you use a large, freely available, high-quality of efficient well-written classes... Such as Laplace or Krylov matrix solver..
14
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
15
Future of Sather ?? Sather will be around but it will not be as popular as Java, C, C++ or Fortran. ??
16
For more info visit http://www.icsi.berkeley.edu/Sather or e-mail sather@icsi.berkeley.edu or subscribe the news group comp.lang.sather
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.