Re: Eu improvements (part 4)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Karl Bochert wrote:
> > > Point_3D A
> > >  A={{1,1},1}
> --I think you are discarding something valuable if you expose the
> --innards this way. 
I agree that is a truly awful way to initialise a point_3d and warrants some
seriously negative style points, but as for "innard exposure", it is unavoidable.
Consider
procedure p(object o)
    ?o
end procedure
Point_3D A
-- initialise A
..
p(A)

What else you gonna do? Encrypt it?
The contents will be exposed, period.

> Think about the versioning of external libraries
You lost me there.

> If a function operates on a Point, should it also operate on a Point_3D?
Quite. A return {x*cos(y/x),y*sin(x/y)} might work fine on a Point but will chop
off the z of a flattened point_3d. If we have line as point,point then how can we
specify the first or second x if it's flattened? If line is flattened, then how
do functions from point operate on [1..2] or [3..4]?

Flattening just won't work.

I agree that any point_3d which needs different syntax to access the x and z
coordinates is badly written. line as point,point is a much better example.

Regards,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu