What's the conventional wisdom / best practice on defining data structures for an application?
Given there is no explicit keyword/operator support like C (typdef, struct) is it merely a case of convention and using boxed structures. I have read several operators that can modify structures both as new aliased copies and in-place modifications but I do not have the experience with J to know what's efficient at run time in time / memory etc. My specific use case is that of a vertically scrolling star field... I intend to recreate and hopeful extend the tiny little game I wrote but never finished, screenshot here: http://seancharles.xyz/posts/2019-10-06-all-at-c.html In that I had a struct that had the x, y, dy and type values but it seems to me that given that J is all about arrays, it might be more efficient using parallel arrays i.e. x array, y array, dy array etc. Also, given that the state is being updated in a tight event loop using the time differential between frames to calculate the step motion (i.e. CPU speed independently), what are your thoughts on immutable updates producing new arrays or updating in place ? Thanks, Sean. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
