I was just thinking about the following situation:
Let’s say we have a line definition like shown below. Here start and end are both points.
let line = {
start: {x:0, y:0},
end: {x:0,y:0},
orientation: 'vertical'
}
Now imagine we have a very large array of lines, how do we save space? I know you can replace the orientation value 'vertical'
with an Enum. But can you save space on the key names without reducing readability? E.g., you can replace orientation
with o
, but now it is no longer clear what the key stands for.
Let me know!