这个命名约定是什么?

发布于 2024-08-14 17:29:34 字数 241 浏览 4 评论 0原文

我正在查看来自多个开发人员的具有多种命名约定的代码 - 真是一种享受。其中包括匈牙利语(“s_year”,“s_day”)以及其他风格(“yearS”,“dayS”)。

有谁知道这种风格叫什么?对于奖励积分,您知道它起源于何处/何时?

免责声明:奖励积分是假设的,仅根据每个请求授予。请给予 5-12 周的交货时间。

编辑:我想补充一点,同一个文件中有第三个符号(“sYear”,“sDay”)。这是命名约定的帽子戏法!

I am looking through code that has multiple naming conventions from multiple developers - a real treat. Amongst them are Hungarian ("s_year", "s_day") as well as this other style ("yearS", "dayS").

Does anyone know what this style is called? For bonus points, do you know where/when it originated?

Disclaimer: Bonus points are hypothetical and awarded on a per-request basis only. Please give 5-12 weeks for delivery.

Edit: I would like to add that there is a third notation ("sYear", "sDay") in the same file. It's the hat trick of naming conventions!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

り繁华旳梦境 2024-08-21 17:29:34

这是没有命名约定或经常更改命名约定的完美示例。不幸的是,我已经看到很多这样的情况了。

This is an perfect example of either no naming convention, or of a frequently changed naming convention. Unfortunately, I have seen this quite a lot.

人生百味 2024-08-21 17:29:34

它被称为“脑白质切除记法”。它是由 RP McMurphy 发明的。

It is called "lobotomized notation". It was invented by R. P. McMurphy.

空袭的梦i 2024-08-21 17:29:34

它很可能根本不是一个符号 - 通常[懒惰]程序员需要一个唯一的变量,其中类似的变量已经在范围内 - 因此他们需要另一个“年”的持有者,并且“年”已经被采用了,所以他们选择了“yearS”。如果它有任何符号的话,那就是在它的好色中脱颖而出,以提醒您将其更改为将来有意义的东西(这从未实现过。哇哈哈哈哈哈!)

It's likely it's not a notation at all - quite often [lazy] programmers will have a need for a unique variable where a similar one is already in scope - hence they needed another holder for a 'year' and 'year' was already taken so they opted for 'yearS'. If it's any notation at all, it would be to stand out in its blecherousness as a reminder to change it to something meaningful in the future (which never came. Mwahahahaha!)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文