Chad Z. Hower aka Kudzu said:
I didnt necessarily want to do it - the code I posted was just to show
"What" it would do. Im using the copy constructor behaviour and am just
fine with that.
Well, you said you'd *like* to do it in your first post - I was going
on that.
It's easy - 1 to 5, 0, to 4, goofing up of the condition mostly.
No, I mean I wonder what the cause of the discrepancy is - you seeing
it lots, and me seeing it very rarely.
Aah - sorry I should have clarified that. I prefer they use while loops
*when* its not a simple for i = 1 to 5 condition. Certainly not for that
condition.
Right, okay.
I find a lot of things hard in Java. Ack what they call properties... They
are methods! There's no property about it - its a blooddy pattern I could
do in VB... reminds me of OOP in SAS.
No-one's claiming it's anything more than a pattern in Java.
Here is where we will strongly disagree then for sure.
Making code self-explanatory is a big thing for me. Implicit
conversions can definitely be confusing - I've seen *that* lots on the
newsgroups. Again, it's something Java doesn't have and which I don't
miss when I go back to Java.
But you *do* know the value. Becuase its a new value type.
BCD x = 4;
decimal i = x;
i equals 4.
It *is* a new value type - and thus its value is 4. There are many other
non value type uses for implicits too.
I wasn't talking about implicit conversions in general - I'm talking
about the idea from your first post where you did:
MyStruct x;
x.SomethingElse = 5;
x = 4;
and you'd want the value of x *not* to be completely determined by the
RHS (which is just 4). You'd want it to be determined by both the RHS
and the previous value of x. That's counterintuitive.
That's what I was saying was a bad idea on principle, regardless of
implementation.
Yes - true. Its not a copy constructor, its similar behavioru. I introduced
the term when I was describing some behaviour, and its gone out of context
since then.
Sure. So long as I know what you mean, it doesn't really matter.