[Swift-devel] 'mapped type' terminology

Michael Wilde wilde at mcs.anl.gov
Wed Jan 28 11:25:34 CST 2009



On 1/28/09 8:56 AM, Michael Wilde wrote:
> I agree with this comment. Early on I felt that files should be a 
> primitive type - in the language today they show all the attributes of 
> such.
> 
> One alternative is to add "file" to the list of atomic types.
> Another is to call single files a mapped atomic type.
> A third is to find a better name than "mapped type" or "marker".
> 
> Can a mapped atomic object be mapped to anything but a file?  Ie, if the 
> mapper associates a database or service handle with an object, encoded 
> as a string returned by the mapper, when the app is called, wont the 
> implementation attempt to locate and pass a file to the application?
> 
> (Sorry that this is digressing, but it seems that to name this concept 
> we need to make sure we understand its definition)
> 
> It seems that its the @filename() designation that causes the current 
> file-handling behavior at runtime, and other @something() primitives 
> could cause other runtime behavior (such as @handle() for passing the 
> opaque mapping or @database() for database-specific passing).

I take that back - its the act of passing a file-mapped object to an 
atomic that causes the file to be transfered to or from the site of 
execution.

So it would need to be the type of mapping that causes different 
mappings to be handled differently.

- Mike

> 
> If we did this, then we are essentially expanding the possible set of 
> mapped atomic types. One way to do that is to define a tiny set of such 
> mapped atomic types. Two that would be useful are:
> 
> file == @filename()
> data == @data() (for an opaque handle, or @handle)
> 
> - Mike
> 
> 
> On 1/28/09 8:31 AM, Ben Clifford wrote:
>>> From hpdc draft:
>>
>>> Types in Swift can be atomic or composite. An atomic type can be 
>>> either a primitive type or a mapped type.
>>
>> The phrasing of this kinda excludes the idea that composite types 
>> might be mapped, which is not true at all...
>>
>> The atomic types that are mapped to single files are what I initially 
>> called marker types; a better term was sought for that but 'mapped 
>> type' is not it in my opinion - being a mapped type or not is 
>> orthogonal to the atomic/composite distinction.
>>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel



More information about the Swift-devel mailing list