19:42
I have a question on code style (if this isn't adequate for the chat, do tell and I'll refrain from talking about this in the future)
Let's suppose I'm dealing with CSV data for a Person entity, and I know each row brings me data in the following order, Id, Name, Job and Date of Birth
I created an of
operator defined as of ← {⍵⊃⍨⍵⍵⍳⊂⍺⍺}
And given PersonModel ← 'Id' 'Name' 'Job' 'DoB'
, I can use this operator as such: 'Job' of PersonModel ⊢ rowData
(which, supposing rowData
is 1337 'John Doe' 'Developer' '1991-01-01'
, this would return 'Developer')
Now, while this is nice as a DSL, would this be overly complicated / overly verbose for APL standards?