命名约定:寻找混合英语和域/工作流术语的替代方法 [英] Naming conventions: Looking for alternative to mixing of English and domain/workflow terms

查看:40
本文介绍了命名约定:寻找混合英语和域/工作流术语的替代方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然在我们公司,所有人都是非英语母语人士,但我们努力用英语编写我们的文档、代码和评论,当然,除了与用户相关的内容之外,几乎所有内容都是如此.只要业务术语是可翻译的并且不太特定于域,就可以.但是,一旦业务术语变得过于具体,要么没有适合它们的翻译,要么翻译听起来很愚蠢且毫无意义.这会导致编写代码时出现糟糕的语言混合.

Though at our company all people are non-native english speakers we try hard to write our documentation, code and comments in english, pretty much everything except user-related stuff, of course. This is ok as long as business terms are translateable and not too specific to the domain. But once the business terms get too specific, either there is no adquate translation for them or the translation just sounds silly and meaningless. This leads to a awful language-mix when writing code.

您对这个话题有什么经验?你是尽量避免在代码中使用愚蠢的名字,还是只是忍受它?

What is your experience on this topic? Do you avoid silly names in code by all means or do you just live with it?

推荐答案

我认为,当所有开发人员和用户都使用共同的非英语母语时,试图将所有内容都保留为英语不仅无用,而且实际上是有害的.领域术语只是最明显的例子.

I think that trying to keep everything in English when all developers and users have a common non-English native language is not only useless but actually harmful. Domain terms are just the most obvious example.

IMO 的所有领域术语都应使用母语,文档和评论也应如此.这允许开发人员专注于代码的逻辑而不是翻译问题.在代码中混合使用两种语言可能看起来很愚蠢,即使在单个方法名称中,但 IMO 并不是真正的问题,而且比在没有人真正受益的情况下努力使用英语更好.

IMO all domain terms should stay in the native language, as should documentation and comments. This allows developers to concentrate on the code's logic rather than translation issues. It may look silly to have a mix of two languages in the code, even within single method names, but IMO it's not really a problem and better than making a great effort to have everything in English when nobody actually benefits from it.

当然,这仅适用于所描述的场景.如果您是一家大型国际公司的部门,或者计划在国际上扩展您的市场,或者您的母语没有很多人使用,那就另当别论了.

Of course, this only applies in the described scenario. If you're a department of a large international company, or planning to expand your market internationally, or your native language has not very many speakers, then it's a different matter.

这篇关于命名约定:寻找混合英语和域/工作流术语的替代方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆