Date: Thu, 28 Mar 2024 09:53:44 +0000 (UTC) Message-ID: <1816889647.24471.1711619624721@ae5f4610bf64> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_24470_306078868.1711619624721" ------=_Part_24470_306078868.1711619624721 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Here, we present the Slice language. Slice (Specification Langua= ge for Ice) is the fundamental abstraction mechanism for separating object = interfaces from their implementations. Slice establishes a contract between= client and server that describes the types and object interfaces used by a= n application. This description is independent of the implementation langua= ge, so it does not matter whether the client is written in the same languag= e as the server.
Even though Slice is an acronym, it is pronounced as a single syllable, = like a slice of bread.
Slice definitions are compiled for a particular implementation language = by a compiler. The compiler translates the language-independent definitions= into language-specific type definitions and APIs. These types and APIs are= used by the developer to provide application functionality and to interact= with Ice. The translation algorithms for various implementation languages = are known as language mappings. Currently, Ice defines language ma= ppings for C++, Java, C#, Python, Objective-C, Ruby, and PHP.
Because Slice describes interfaces and types (but not implementations), = it is a purely declarative language; there is no way to write executable st= atements in Slice.
Slice definitions focus on object interfaces, the operations supported b= y those interfaces, and exceptions that may be raised by operations. In add= ition, Slice offers features for object p= ersistence. This requires quite a bit of supporting machinery; in parti= cular, much of Slice is concerned with the definition of data types. This i= s because data can be exchanged between client and server only if their typ= es are defined in Slice. You cannot exchange arbitrary C++ data between cli= ent and server because it would destroy the language independence of Ice. H= owever, you can always create a Slice type definition that corresponds to t= he C++ data you want to send, and then you can transmit the Slice type.
We present the full syntax and semantics of Slice here. Because much of = Slice is based on C++ and Java, we focus on those areas where Slice differs= from C++ or Java or constrains the equivalent C++ or Java feature in some = way. Slice features that are identical to C++ and Java are mentioned mostly= by example.