Y
Hacker News
new
|
ask
|
show
|
jobs
by
FlipperBucket
2862 days ago
I prefer a convention of semantically relevant variable names prefixed/suffixed by a letter indicating type.
2 comments
Sharlin
2862 days ago
Didn't we already collectively decide that Hungarian notation is a bad idea? About 20 years ago?
link
FlipperBucket
2862 days ago
No. It's alive and particularly pragmatic in dynamic languages. The type of sigil, @ or $ or I or Array(space) are all equal to the interpreter. The difference is how offended you might be that type annotations are semantically identical.
link
jetrink
2862 days ago
To be clear, the above examples are used when the function is designed to accept any such argument and only relevant info is the type.
link