What is the difference between
abstype mytyp = ptr
and just
abstype mytyp
Is the first the same as:
abstype mytyp
typedef mytyp = ptr?
What is the difference between
abstype mytyp = ptr
and just
abstype mytyp
Is the first the same as:
abstype mytyp
typedef mytyp = ptr?
abstype mytyp = ptr // this one is correct
abstype mytype // this one currently causes problems during compilation
(but it is okay during typechecking)
abstype mytyp
typedef mytyp = ptr?
Should never do this. If you do this, then the first declaration is
shallowed.On Thursday, February 20, 2014 9:27:52 PM UTC-5, Brandon Barker wrote:
What is the difference between
abstype mytyp = ptr
and just
abstype mytyp
Is the first the same as:
abstype mytyp
typedef mytyp = ptr?
You guessed right. The answer is negative.
The following declaration says that mytype is abstract and
its size equals the* size* of @(int, int).
abst@ype mytype = @(int, int)
In other words, mytype and @(int, int) have the same size.
This information is needed for allocating memory needed to store
a value of mytype.On Wednesday, May 14, 2014 12:47:46 PM UTC-4, Brandon Barker wrote:
I am still a bit unclear on how to use these at times. If the
implementation is still in flux, knowing what is intended versus what is
implemented might also be helpful to know about.For instance, is this:
abst@ype mtype = @{int, int}
essentially the same as:
abst@ype mytpe = ptr
assume mytype = @{int, int}?
My guess: no, but I don’t really know why it wouldn’t be.
On Thursday, February 20, 2014 10:30:11 PM UTC-5, gmhwxi wrote:
abstype mytyp = ptr // this one is correct
abstype mytype // this one currently causes problems during compilation
(but it is okay during typechecking)abstype mytyp
typedef mytyp = ptr?Should never do this. If you do this, then the first declaration is
shallowed.On Thursday, February 20, 2014 9:27:52 PM UTC-5, Brandon Barker wrote:
What is the difference between
abstype mytyp = ptr
and just
abstype mytyp
Is the first the same as:
abstype mytyp
typedef mytyp = ptr?
I am still a bit unclear on how to use these at times. If the
implementation is still in flux, knowing what is intended versus what is
implemented might also be helpful to know about.
For instance, is this:
abst@ype mtype = @{int, int}
essentially the same as:
abst@ype mytpe = ptr
assume mytype = @{int, int}
?
My guess: no, but I don’t really know why it wouldn’t be.On Thursday, February 20, 2014 10:30:11 PM UTC-5, gmhwxi wrote:
abstype mytyp = ptr // this one is correct
abstype mytype // this one currently causes problems during compilation
(but it is okay during typechecking)abstype mytyp
typedef mytyp = ptr?Should never do this. If you do this, then the first declaration is
shallowed.On Thursday, February 20, 2014 9:27:52 PM UTC-5, Brandon Barker wrote:
What is the difference between
abstype mytyp = ptr
and just
abstype mytyp
Is the first the same as:
abstype mytyp
typedef mytyp = ptr?