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

> I don't judge the Go enjoyers, but I prefer writing TypeScript to Go which says it all.

The functional style is fine for simple filter/map algorithms, but once you get into zipping multiple iterators together, classic for-loops are often easier.

My company's hiring coding task had this "trap", at one point you needed to write an algorithm to merge consecutive "empty" cells in a data structure that is used to represent a simple table. This is dead easy with a regular for-loop, but writing it in a "functional" style could easily become extremely hairy and/or have O(N^2) complexity.




You can use loops in typescript if you need to.


Sure. I'm just saying that the functional style is not always the best.




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

Search: