Functions vs. Static Methods

前端 未结 4 1852
心在旅途
心在旅途 2020-12-16 15:01

I\'ve got a few functions that deal with cookies. Would it be a horrible idea to group them by moving them to a class of their own and use them as static methods?

F

4条回答
  •  囚心锁ツ
    2020-12-16 15:56

    It's actually good practice to organize functions like that. A modern alternative would be to use a namespace.

提交回复
热议问题