Question: We are in the process of anylizing the page performance, i would like to know if we have like 10 images , 2 css , 3 JS files. How is IE 7 , 8 actually how render the content. 

-> Is it like, it call the resources parllelly or is there any limit on the sequancy it calls all this resources.? Or it has like threds in built which will automatically handle.
-> If we have a JS call towords the end of the page which logs on entry to Anylitics (Pure JS call on client side) , will it wait until the calls finishes to render the page? or it will render what it has on the page?

Answer: 
When you specify that a generic parameter is a private type, well, Ada assumes you mean it :-)

I.e. you have no access to its components. Ada is not "[duck typed](http://en.wikipedia.org/wiki/Duck_typing)", so it's irrelevant whether or not you know that an instantiating type might actually possess a particular field. (How would you expect your Checksum function to work if The\_Transfer\_Type parameter were instantiated with, say, Integer?)

One way to address this is to also supply an accessor function as a parameter to the generic that will retrieve the data needed to, in this case, compute the checksum. E.g.:

```
generic
   type The_Transfer_Type is private;
   with function Get_Checksummable_Data_Item
           (Msg : The_Transfer_Type;
            I   : Integer) return Integer;
   SIZE : Integer;

package CC_Test_Channel is
   function Checksum(Msg : The_Transfer_Type) return Integer;
end CC_Test_Channel;

```

The body is then:

```
function Checksum(Msg : The_Transfer_Type) return Integer is
   Sum : Integer := 0;
begin
   -- calculate the checksum
   for i in 1 .. SIZE loop
      Sum := Sum + Get_Checksummable_Data(Msg, I);
   end loop;
   return Sum;
end Checksum;

```

The function you supply for Get\_Checksummable\_Data is then specific to The\_Transfer\_Type and simply returns the selected value from The\_Transfer\_Type's component fields.

There are a number of other ways to set this up as well, like providing an unconstrained array type as a generic formal parameter and a formal function to retrieve it--this allows you to also get rid of the explicit SIZE formal parameter. Or you could write a Checksum() function as one of the operations on the type that you're instantiating CC\_Test\_Channel with, and then have:

```
with function Calculate_Checksum(Msg : The_Transfer_Type) return Integer;

```

as one of the generic formals.

Step back, and think about the possibilities...
```
generic 
  type The_Transfer_Type is private; 
  ...

```

The above code means that the client can supply any type they dream up for The\_Transfer\_Type (as long as it isn't "limited"). It also means that your generic knows absolutely nothing about the type, except that asignment is available.

With Ada generics there is sort of an inverse relationship between how many different kinds of objects can be supplied for a generic parameter, and what operations are avilable to the generic on those objects. For instance, the most open type would be `is limited private`. You could supply any type whatsover for one of those. However, the generic can do almost nothing with it. Even assignment wouldn't be available. 

Take away the "limited" and you can do asignments with it, but only types that can be assigned may be supplied. On the other extreme, you could define it as:
`type The_Transfer_Type is (<>)` and then you could supply any integer or enumerated type, and would gain things like `'first`. Going still further, you could do `type The_Transfer_Type is range <>`, and you'd gain the ability to do integer math operations, but would only be able to supply integer numeric types.