4 ms·
Learning array languages makes you a better programmer in any other language. The way you think changes. We are taught to approach a problem procedurally. Actua
by anonu 3y ago
Learning array languages makes you a better programmer in any other language. The way you think changes. We are taught to approach a problem procedurally. Actually the for loop is your enemy.
- theamk 3y agoyeah, but why mess with K for that? Grab python+numpy or matlab/octave - it's all the same stuff (likely inspired by K) but with readable syntax, bigger community and so on.
- rak1507 3y agoIf numpy/matlab/octave/... was 'all the same stuff' with none of the downsides and all of the benefits, why would k or array languages in general have such a passionate community? Either every arraylang-er is masochistic (only slightly true) or there's more to it than you think.
- theamk 3y agoThat's a weird argument... passion is not always connected to efficiency/practicality/usefulness, in fact I feel that in a lot of cases it's the opposite. As a great example, look at old computers: they are pretty popular (there is one link on HN front page right now about N64!) and people are super passionate about it, and yet you would not recommend "everyone to play at least one Nintendo 64 game". For non-computer examples, somehow a number of my friends are extremely passionate about super hot (as in spicy) sauces. They bring a new bottle for every meal, and they can talk about the kinds of peppers for hours. It's interesting to hear, but I would not want to try them myself, nor would I recommend this to everyone.
- rak1507 3y agoI'm sure people who are into retrocomputing or spicy food or any other topic could tell you why they prefer that to something more mainstream. Whether or not you would agree, you could recognise that they had different opinions. The issue I had with your comment was writing off k as simply an inferior version of numpy etc rather than trying to consider why people like it, and what it may even do better than the mainstream alternatives.
- theamk 3y agowell, the very first message in the thread said: > Learning array languages makes you a better programmer in any other language. The way you think changes. We are taught to approach a problem procedurally. Actually the for loop is your enemy. I happen to strongly agree with most of this: learning array-based "operations", writing the code where "the for loop is your enemy" is a very valuable experience, and if will make you a better programmer in any language. Everyone should try writing some code like this. The problem is K is a mix of three things: array-based operations, point-free style / tacit programming, and extreme brevity via punctuation abuse and lack of types. And not all of them are equally useful. It's like trying to introduce someone to Chinese cuisine and giving them the spiciest Hunan dish there is. Unless the person already happened to love spicy food, the chances they will just write-off the entire cuisine. I bet there people today who associate "array programming" with obscure character soup of APL/J/K and ignore it because of that. Who knows, maybe if they knew that numpy/octave offers the same thing in more palatable package, there would be more arrays and less "for" loops in the world.
- rak1507 3y agoThe original comment said learning "array languages". There's some debate about what that means, but generally it means APL/J/K/etc not numpy/matlab/etc. As far as I can tell (correct me if I'm wrong) you haven't learned an array language, yet you're telling someone who has (and anyone else who reads your message) not to bother. To use your food analogy, this is like saying "Don't try real Chinese food in a restaurant, just cook some rice at home. Same thing." It's not the same thing. The flavour is completely different.
- MrJohz 3y agoWhat would you see as the big benefit of array languages over simply array-based programming in other languages? Or in other words, what sorts of things will I learn from trying out J or APL, that I wouldn't learn by playing around with Numpy or Pandas?
- 3y ago
- fuzztester 3y ago>spicy can't resist ... de gustibus ... https://en.m.wikipedia.org/wiki/De_gustibus_non_est_disputandum https://en.m.wikipedia.org/wiki/De_gustibus_non_est_disputan... oops, double pun there ;)
- gcanyon 3y ago100% this. I've never done real-world programming in J, but to the extent I learned it (I am far from capable in it) I thought differently about how I work in other languages.