Replies: 1 comment 10 replies
-
Hi Mark, A If you I want to hold more information together (x, y, date, ...), using an Object may be a good solution (that makes it explicit what value has what meaning, instead of relying on the position of a value in a Pair, Tuple, or Array. Would something like this work for you?
|
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
I am considering adding a new type called "Pair" (among other changes) to represent an x,y coordinate that I would then like to use in a graph/chart to create one or more series.
var1 = (1,2) // x,y coordinates
var2 = (,3) // y coordinates specified - represents horizontal line
var3 = (3,) // x coordinates specified - represents vertical line
These points may not necessarily be a numeric for the x or the y as I would like to introduce a date and time data type and potentially others down the track. Also, I would then proceed and add support to the relevant functions to support the operations on this data type.
Hopefully I have set the background of what I am looking at achieving.
Question
Based on the background of what I am trying to achieve, I would like to understand the following:
I guess I am looking for thoughts on this before I go off and implement it and potentially see if there are other thoughts that could achieve the above without writing a heap of code.
Beta Was this translation helpful? Give feedback.
All reactions