Name of a 2D point using 32-bit floats coordinates? (The geometric semantics are meaningful, so no "F32x2" or the like. Also, can't use generics due to no specialization.)
-
-
Replying to @pcwalton
probably vector2 or vec2; if the context wants it to be named something different, then i'm guessing it would be more specific than "point"; e.g. "control_point", "handle", "cursor_location", etc.
1 reply 0 retweets 2 likes -
Replying to @JamesWidman @pcwalton
If you have managed to reserve “vector” for geometry purposes so far, vector2 or vec2f etc. If not, yeah, point2 / point2f
1 reply 0 retweets 2 likes -
Replying to @stephentyrone @JamesWidman
Rust uses Vec for growable arrays unfortunately
1 reply 0 retweets 1 like -
Replying to @pcwalton @stephentyrone
in Jai there is a feature that allows you to apply a renaming rule at the point where you import a module; so e.g. if someone mistakenly released a library that defines "Vec" as a stretchy array, you can do something like: # import std # rename("Vec", "stretchy_array");
1 reply 0 retweets 1 like -
or: # import std # prepend("Vec", "silly_"); // introduces "silly_Vec" in the current scope The beauty of this is that no one ever needs to "reserve" an identifier, because any client can always apply an arbitrary renaming procedure.
1 reply 0 retweets 0 likes
Rust has basically the same feature, but I don’t use it unless I have to to avoid collisions. Makes my code easier to read.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.