Как стать автором
Обновить

Комментарии 1

I admire your honesty and I totally agree how you describe the colliding worlds. I come from the other side (actually starting with C# and Javascript), and I feel the same way. I started out with OOP, but then was drawn into the dynamic world and never looked back.

This section of your text is something I find revealing the difference in mindset:

Take me for example: because of the type restrictions, my code is impossible to use improperly. When I’m working on a project, I rely on others to use types too. Then my code will work just as designed. So I deliberately don’t cover all the cases in which this code can be used incorrectly (because typing makes it impossible). But then a JS developer joins my project, takes my type, wraps it up in Any and starts using it incorrectly, which results in hard-to-replicate bugs.


I guess as a JS Dev you are more anarchistic. I want to hack and see what I can do with it. I'm curious and I don't take your word for it that it works. I want to have access to the implementation and I don't (respectfully) care how you want me to use it :) I only care of if it works (which I can find out myself).

As you already covered but I want to emphasize, types kill creativity in favor of stability. You can have both with both mindsets, but each tool has its strengths and weaknesses.

Thank you for the best Pro-typescript post i have read.
Зарегистрируйтесь на Хабре, чтобы оставить комментарий

Публикации

Изменить настройки темы

Истории