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

It is enough, but not more than. Collecting functions in a group by operating on a shared context is naturally useful and convenient. Pretending otherwise leads to all sorts of “a method, but I see it as a function with an accidental first parameter in a homonimous namespace because having a function name prefix is ugly, and it’s all ugly, but at least it’s not a class”.

  import * as fooNs from './foo'
  fooNs.barBazQuuxFoo(foo, …)
vs

  foo.barBazQuux(…)





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

Search: