datatypes for 2d vectors?

Is there a reason b2Vec2 (or just V2 if you're using the recent alchemy port) isn't derived from as3's own Point? I imagine it's because there is too much overhead involved in that class? I ask because it seems silly constantly instantiating new objects just to convert between two datatypes whose only really important members are x and y. If I want to use a point on the stage from some canonical as3 function that spits out a Point object pt I then have to stuff it into a new b2Vec2( pt.x, pt.y ) just to use it in Box2D. Wouldn't it just be easier to have b2Vec2 inherit from Point and avoid the explicit conversions?

It's especially sloppy when I'm trying to develop my own common interfaces to reuse in my projects. Say I want to create a common entity interface with properties such as position and velocity. I would like to use the basic as3 Point class to describe these as I'm sure I won't be using Box2D in every single project. But then if my project does use Box2D I'll then have all of the overhead of converting between types.

Is there a better way to go about this?
Deriving A from B makes A substitutable where you need B. But not visa versa, limiting utility. It also gives us a mess of different API calls. Fundamentally, inheritance is the wrong relationship for what you want, which is basically not supported by AS3. The other alternative is to use Points everywhere, and use static members to add the extra features vectors have over points, but I don't like this enough to attempt this.

I tend to have toPoint and fromPoint, and take advantage of the type change to encapsulate co-ordinate change. I.e. Points are in pixels, b2Vec2 in meters, and the conversion between them also scales.

You are free to replace b2Vec2 throughout with your own class - that's a plus of open source code.
Thanks for the reply. Makes sense. Just thought I might be missing something. Good point about stuffing coordinate changes in with the point conversion. That's a helpful way to think about it really. I could just make a static class for converting point types and stuff the physics scale in there as well. Save myself passing that value around to all my individual entities. I always hated having to do that. I should have thought of this really.

Original thread: https://box2d.org/forum/viewtopic.php?t=4833