Hacker News new | past | comments | ask | show | jobs | submit login

I like dynamic typing: most of my work is done in untyped Racket or Elixir. Weak typing is fun, but can be frustrating. My issue is that this single data structure functions like a list in some cases, and a map in others. Try piping the result of array_filter to array_map sometime. You can’t do it without an intermediate call to array_values first because the result of passing a list to array_filter does not behave like a list anymore: it operates strictly like a map and cannot have map called on it. (Oh the irony!)



array_map works fine on the output of array_filter and produces a reasonable output in the same shape as the input.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: