Re: Re[2]: (Another) (small) Eu 2.5 feature request.
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 24, 2004
- 481 views
Pete Lomax wrote: [snip] > > Do you mean slower than eg > > Constant PersonalName=1, > FamilyName=2, > ... > type customer(sequence s) > if length(s)!=5 then return 0 end if > if not sequence(s[PersonalName]) then return 0 end if > ... > end type > Yes, I think it would. The 'type' behaviour only slows down access to variables of that type, but if any variable could be a struct, then every append, concatenate, assign, etc... would have to do an additional check to handle the possibility - even if you had not defined any structs. > >In which case, the interpreter would need to add extra checks to > >append(), prepend(), &, slicing and assignment to make sure it was > >not changing the target's length, or datatypes. > Hmmm. You got me thinking about ways to make some of that illegal in > the eyes of the compiler... Yes, a compiler has more opportunity to catch these things before execution begins. However you still have to cater for things like ... object Temp Temp = CurrentCust Temp.ZIPCode = 1234 -- Derek Parnell Melbourne, Australia