本篇继续整理日常项目中语义化命名(变量、类、常量、函数、接口、属性等)的一些实践工作,原则上尽量避免用一些生僻词。

中文 英文 中文 英文 中文 英文
收藏 collect 草稿 draft 编码 encode
缓存 cache 注入 injection 关注 follow
第三方的 third-party 共享的 shared 主键 primary key
主要的 primary 次要的 secondary 性能 performance
chain 确保 ensure 解析器 resolver
内联的 inline 高级的 advanced 从句 clause
深度 depth 指定 specify 特定的 particular
长度 length 宽度 width 高度 height
支持 support 填充 fill 对象 object
记录 record 指针 pointer 生命周期 lifecycle
自定义 customize pool 连接池 connection pool
标记 tag 等价于 equal 连接 connect
采纳 adopt 嵌入 embed 禁用 disable
打包 pack 声明 declare 约定 convention
加载中 loading 预加载 preload package
文档 docs 单个 single libs
地图 map 移动 move 撤退 retreat
搜索 search 查找 find 获取 get
对比 compare 定律 law 方程 equation
简介 profile 预算 budget 浪费
叶子 leaf root 节点 node
tree 全局的 overall 定期 regular
调度 dispatch 归属于 belong 修剪
删除
prune
阶段 phase 日志 log
峰值 peak 功率 power 趋势 trend
讨论 discuss 挂载
安装
mount 数量 amount
法律
定律
law 标签 tag 拒绝 refuse
工具箱 toolbox
utils
崩溃 crash 访问 access
人工智能 ai 本地的 local 保留的 reserve
翻译 translate 拆分 split 切片 slice
提供 provide
图表
graph 男性 male
女性 female 公开的 public 私人的
私密的
private
bucket 约束 constraint 未知的 unknown
性别 gender 大量的 large 预测 predict
验证 validate 产生 yield 设置 setup
重置 reset 同步 sync 异步的 async
加载中 loading 固定的 fixed 关联 associate
最大值 maximum 最小值 minimum 层级 level
重写 override 嵌入 embed field
声明 declare 作者 author 支持 support
数据源名称 dsn 链接 link 驱动 drive
动态的 dynamic 静态的 static 资源 resource
算法 algorithm 基准 baseline 结果 result
周期 period 上下文 context 主要的 major
焦点
重点
focus 论文 paper 已完成的 finished
结论 conclusion 未来的 future 过去的 past
当前的 current 投放 delivery 改善 improve
平滑度 smoothness 电影 movie 时长 duration
冲突 conflict 记录 record 批量的 batch
传递 pass 回话 session 钩子 hook
单个 single 一对 couple
pair
排查 check
多个 multi 收集 collect 采集器 collector
二维码 qr_code 验证码 verify_code 条形码 barcode
打印机 printer 扫描 scan 消失 disappear
其他的 other 技能 skill 产品 product
消费者 consumer 客户 customer 利润 profit
逗号 comma 格式化 format 关闭 close
打开 open 年度的 annual 说明书 manual
丢弃 dump 主干 trunk 分支 branch
数据流 stream 时序 timing 装置 devoice
闭包 closure 崩溃 crack 暴跌 crash
Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐