News for hackers. Stuff that matters.
Re:C4: C in Four Functions (2014) by lifthrasiir on Tuesday February 18, 2020 @08:42AM (#22355961)
I do agree that `tk` is an unusual abbreviation, but `tok` for `token` is pretty common in language implementations. `ty` for `type` is also usual.

The names are not only read but also being manipulated in your mind. You will see tons of `token`s and `type`s throughout the code and while you can read them fine you will have hard time dealing with them in your mind. For uncommon names that are usually read out of the context, longer names are preferred. For common names or local enough names, short mnemonics that evoke the original name really help. When it is not possible, people usually develop a specialized terminology for them.

Re:C4: C in Four Functions (2014) by DagAgren on Tuesday February 18, 2020 @08:47AM (#22355992)
I don't have any problem holding properly named variables in my mind, so I don't see what the problem is here?

The only issue is that if you are writing gigantic statements with lots of variables, it gets too long to see properly. And that is a sign that you are writing too large expressions, and need to start cutting them into smaller parts anyway.

Re:C4: C in Four Functions (2014) by lifthrasiir on Tuesday February 18, 2020 @09:02AM (#22356095)
You don't always replace X and Y (as in coordinates) to something longer. I know, they can be (and probably should be) replaced with left/right and top/bottom when we are talking about boxes, but not all X and Y can be replaced.
Re:C4: C in Four Functions (2014) by psychoslave on Tuesday February 18, 2020 @05:36PM (#22361146)
You replace them with abscissa and ordinate actually. And Z will be applicate, it seems, although I already heard azimuth used for this one. I'm not aware of a dedicated terms for higher dimensions, so your beautiful (w,x,y,z) quaternion tuple is a big deal, isn't it.

Anyway, you can always use an array `coordinates` with whatever dimensions you want.

Re:C4: C in Four Functions (2014) by DagAgren on Tuesday February 18, 2020 @09:05AM (#22356113)
Sure, but those are commonly used names and well established, so they act as actual, proper words in this kind of discussion. There are some widely accepted short names that can still be descriptive.

But arbitrary abbreviations like "tk" don't fall into this category.

Re:C4: C in Four Functions (2014) by lifthrasiir on Tuesday February 18, 2020 @09:18AM (#22356196)
You need some basic understanding of 2D graphics to understand what is X and Y. In fact, they are not good names otherwise because it is pretty easy to mix them up---one more reason to prefer left/right/top/bottom whenever possible. I've seen some codes using Column and Row instead of X and Y for that very reason. (Not to say that I like it.)

If you are okay with X and Y, you should probably have to accept that the definition of "commonly used", "well established" and "actual, proper" words is subjective and different areas and projects have different notions of them. I'm okay with `tk` if it is used consistently and doesn't interfere otherwise.

Re:C4: C in Four Functions (2014) by JustSomeNobody on Tuesday February 18, 2020 @10:54AM (#22356902)
Yes they do. tk, pc, sp, a, etc all fall into the well established category in this context.