Every stdlib function should use the shortest, easily understood parameter name possible.
For example, say(message: ...) becomes say(msg: ...). The goal is brevity without sacrificing clarity. A developer reading the call site should still immediately know what the argument means.
Guidelines
- Prefer common, well-known abbreviations:
msg, val, fmt, src, dst, buf, len, idx, fn, cb, sep, delim, str, num, err, cmd, dir, env, cfg, ctx, opt, max, min
- Single-word names that are already short can stay as-is (e.g.
name, path, key, port)
- When two abbreviations are equally clear, pick the shorter one
- Don't abbreviate to the point of confusion.
n is fine for a count in a math context, but name shouldn't become n
Scope
All public stdlib functions across every std/* module. This is a breaking change for any code using named arguments, so it should land as a single pass.
Every stdlib function should use the shortest, easily understood parameter name possible.
For example,
say(message: ...)becomessay(msg: ...). The goal is brevity without sacrificing clarity. A developer reading the call site should still immediately know what the argument means.Guidelines
msg,val,fmt,src,dst,buf,len,idx,fn,cb,sep,delim,str,num,err,cmd,dir,env,cfg,ctx,opt,max,minname,path,key,port)nis fine for a count in a math context, butnameshouldn't becomenScope
All public stdlib functions across every
std/*module. This is a breaking change for any code using named arguments, so it should land as a single pass.