How do you program differently in dynamic languages?

前端 未结 15 1531
南笙
南笙 2021-02-01 03:37

How would someone who really knows how to take advantage of dynamic programming languages approach programming differently than someone working in a static language?

I

15条回答
  •  情歌与酒
    2021-02-01 03:51

    It comes down to one of my favorite ratios: How much time I spend thinking about solving a problem, vs. how much time I spend thinking about the tool I'm using to solve the problem. Think of it as equivalent to S/N ratios.

    With duck-typing languages (which I consider to be the factor that helps me the most with productivity), I simply am able to spend more time thinking about my problem and its solution (and write code that addresses those specifically), and I spend less time keeping the language artifacts straight.

    Then there's a lot of code I just don't write, involving declarations and especially type-casts.

    But it's mainly keeping my focus in the sweet spot.

提交回复
热议问题