Hacker Newsnew | comments | show | ask | jobs | submit login

Why? Adding a new keyword also means adding new syntax and also will break stuff, e.g.

  var new-return-from-keyword = "test";

Its not about "breaking stuff". Its about keeping the language as small as possible. Part of JS's success is being small as a language.


For example you could teach functions to beginner programmers once. And could then easily introduce lambdas/callbacks/generators(And maybe block lambdas) without introducing much new syntax.


1) who said that it has to be added as a keyword? 2) It's trivial to fix it even in that case. 3) A well chosen keyword will break like 0.0000000000000000001% of the web. Big deal.


Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact