Re: Integer Do's And Don'ts
Well, all this discussion has forced me to try to become a little more
informed about how things really are as opposed to how I think they might be
in the future. ;-)
After mulling through much of the CLS docs, I must say I'm leaning more on
the side of the fence with the, obviously more informed, MVP's.
I did find Jay's point about System.IntPtr already being a platform specific
implementation to be a real point of contemplation. The CLS defines the
Primatives very clearly. And the CLS already does define a platform specific
implementation in the IntPtr. This in itself would be a good argument that
the Primitive alias types will probably not change.
Gerald
"Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP @msn.com> wrote in message
news:eHhkI75sEH A.3788@TK2MSFTN GP09.phx.gbl...[color=blue]
> Cor,[color=green]
> > I think that in your proposition it is better to use only Int32 than you
> > have no problems with interop or anything else what can lead to
> > misunderstandin g.[/color]
> What are you attempting to say here?
>
> Are you attempting to agree with Ken, Herfried, and I? We have all stated
> that for Interop, with unmanaged code, we use the explicit types. As
> Herfried & I have stated, we do this because the unmanaged sizes might
> change.
>
> For managed code I find Short, Integer, and Long to be the more "explicit"
> types.
>[color=green]
> > But future will tell, now it is academic[/color]
> The future is here today! Whidbey (aka VS.NET 2005, due out later in 2005)
> includes the 64-bit version of the Framework. As Herfried & I have state,
> Integer is still an alias for Int32. I don't see where there is anything
> academic. I am talking existing 64-bit & 32-bit versions of the Framework!
>
> Hope this helps
> Jay
>
> "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
> news:eD5DXt5sEH A.904@TK2MSFTNG P11.phx.gbl...[color=green]
> > Jay,
> >[color=darkred]
> >>In other words on any size of processor (8, 16, 32, 64, 128, 256) that
> >>VB.NET's Integer is an alias for System.Int32![/color]
> >
> > I think that in your proposition it is better to use only Int32 than you
> > have no problems with interop or anything else what can lead to
> > misunderstandin g.
> >
> > Therefore we disagree in this, I think Microsoft did not advice Integer
> > just for fun.
> >
> > But future will tell, now it is academic
> >
> > Cor
> >[/color]
>
>[/color]
Well, all this discussion has forced me to try to become a little more
informed about how things really are as opposed to how I think they might be
in the future. ;-)
After mulling through much of the CLS docs, I must say I'm leaning more on
the side of the fence with the, obviously more informed, MVP's.
I did find Jay's point about System.IntPtr already being a platform specific
implementation to be a real point of contemplation. The CLS defines the
Primatives very clearly. And the CLS already does define a platform specific
implementation in the IntPtr. This in itself would be a good argument that
the Primitive alias types will probably not change.
Gerald
"Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP @msn.com> wrote in message
news:eHhkI75sEH A.3788@TK2MSFTN GP09.phx.gbl...[color=blue]
> Cor,[color=green]
> > I think that in your proposition it is better to use only Int32 than you
> > have no problems with interop or anything else what can lead to
> > misunderstandin g.[/color]
> What are you attempting to say here?
>
> Are you attempting to agree with Ken, Herfried, and I? We have all stated
> that for Interop, with unmanaged code, we use the explicit types. As
> Herfried & I have stated, we do this because the unmanaged sizes might
> change.
>
> For managed code I find Short, Integer, and Long to be the more "explicit"
> types.
>[color=green]
> > But future will tell, now it is academic[/color]
> The future is here today! Whidbey (aka VS.NET 2005, due out later in 2005)
> includes the 64-bit version of the Framework. As Herfried & I have state,
> Integer is still an alias for Int32. I don't see where there is anything
> academic. I am talking existing 64-bit & 32-bit versions of the Framework!
>
> Hope this helps
> Jay
>
> "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
> news:eD5DXt5sEH A.904@TK2MSFTNG P11.phx.gbl...[color=green]
> > Jay,
> >[color=darkred]
> >>In other words on any size of processor (8, 16, 32, 64, 128, 256) that
> >>VB.NET's Integer is an alias for System.Int32![/color]
> >
> > I think that in your proposition it is better to use only Int32 than you
> > have no problems with interop or anything else what can lead to
> > misunderstandin g.
> >
> > Therefore we disagree in this, I think Microsoft did not advice Integer
> > just for fun.
> >
> > But future will tell, now it is academic
> >
> > Cor
> >[/color]
>
>[/color]
Comment