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

+1 For some kind of keyword for Return-from (Although could be emulated with exceptions).

-1 For adding block syntax.

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.

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