Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's the trade off isn't it. ' is unnecessarily short and doesn't convey any information at all, or worse, the wrong information. There are other comments that point out that ' is valid in identifier, or used to indicate that something is derived from something else.

Some will prefer the short nature of just typing ', where people like me would prefer that you just add a few more characters so it reads more easily.



It is, but not a trade off many would make.

' itself (!) may not convey information, but it's existence does convey information.

While making it a keyword may help beginners to understand code and wish they could see the meaning directly, because they don't know the meaning of certain symbols yet, people who know the language and productively produce code are more concerned about content rather than syntax.

Content meaning the name of the life time, the name of the types, the name parameters, the structure of the types, the constraints on the types, etc.

Especially for Rust, there is a lot of the things mentioned above, and since the concepts in Rust aren't easy, it's important that these things get as much space as possible from the limited space on the screen, instead of wasting it by self explaining syntax elements, which are trivial to memorize.

Thus { instead of begin_function_body, *; instead of statement_end, ? instead of 'if err != nil then return err' and ' instead of lifetime.




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

Search: