-1
$\begingroup$

I always see that people in the fields consider confusing vectors with positions as a severe error in one and n dimensions. Recently I have also encoutered a timedelta type in Python. By increadably inadequate reaction and severe punishment, I realize that people in the fields taboo answering why is the difference.

Might be the computer scientists are different and can tell the principal difference among the types. Does time differece has different nature from the datetime? Does a = b-c has the same nature as the b and c? In which case do you introduce a new type? Why do they say that a has the same type in case of int but not in case of time or position?

Is this related to dimensional analysis? It seems like dimensional analysis would say that a has the same unit of measurement (and therefore the type) as the b and c in a=b-c. Is this correct?

$\endgroup$
  • 1
    $\begingroup$ Hey Val, you just rolled back a bunch of the edits I made to improve the question. Your rollback re-introduced spelling mistakes, grammar errors, rant-y statements that are not relevant here ("increadably inadequate reaction and severe punishment" - come on), and other problems. Please don't do that. This is a community site with shared ownership of questions. Please see Why can people edit my posts? How does editing work? to understand the site model, and don't gratuitously roll back edits that others have made to improve your question. $\endgroup$ – D.W. Nov 29 '13 at 20:02
  • $\begingroup$ Your "ownership" removed a half of my question. I have told you that my question is more general than time alone. Might be you will invent the questions for me next time? $\endgroup$ – Val Nov 29 '13 at 21:50
  • $\begingroup$ I don't think my statement is really worth a separate answer, so I reply with a comment. The problem is as simple as this: the difference between two dates is not a date. The difference between two ints is an int. I don't think this has anything to do with dimensional analysis, as it makes sense to talk about it in the context of types for which addition and multiplication is defined. $\endgroup$ – Daniil Nov 30 '13 at 13:57
  • 1
    $\begingroup$ @Val, Well, consider what do we actually mean by dates? Date is some specific point in time, e.g. May 1 or May 7th. The difference of those dates, however, is not a point in time itself, it's a whole week. For example one might say "What were you doing on the 1st of May", but "What were you doing between the 1st of May and the 7th of May". $\endgroup$ – Daniil Nov 30 '13 at 14:14
  • 1
    $\begingroup$ @Val, Haskell does have a timediff function, in fact, it takes two dates and returns a time difference. '-6 days' is not a date in the same sense as '1th of January, 12:00 GMT' is. The subtraction on timediffs can be easily defined and I think it's reasonable that the sum or subtraction of two timediffs is a timediff. $\endgroup$ – Daniil Nov 30 '13 at 17:31
1
$\begingroup$

You already got a reasonable answer, the last time you asked this question. For instance

In a nutshell, because datetimes have additional metadata (e.g. timezone) and behave non-linearly, while timedeltas are always linear and have no timezone, etc attached. For example, adding two one-day timedeltas always produces a two-day timedelta, while adding a one-day timedelta to a given datetime may or may not advance the datetime to the next day depending on what value the datetime has (i.e. daylight savings, leap seconds, etc) [Joe Kington]

Some friendly advice: if you really want an answer, take care to avoid ranting. Approach things with an open mind and from the perspective that you want to learn, not from the perspective that you already know the correct answer and anyone who disagrees with you must be wrong. Try to be a little less aggressive and a little more humble and open to learning. I have edited your question above to remove the ranting for you.

$\endgroup$
  • $\begingroup$ What makes you think that I approached with a ready-made answer? I was really sure that there is a serious reason that I am not aware of and was very curious to know. You should see that I had no objections toward the right answer (thanks of picking it). I just do not buy the first nonsense thrown on my. Everybody must point to the obvious nonsense in responses and demand to fix them/elaborate! How can you deny it as "closed mindedness" and "ranting"?! Everything is vise-versa. My mind is much more open than of peoples' who force me to accept wrong things. $\endgroup$ – Val Nov 29 '13 at 18:35
  • $\begingroup$ I also do not understand why did you remove the space part of my question. $\endgroup$ – Val Nov 29 '13 at 18:40
  • 1
    $\begingroup$ @Val, are you a bot? $\endgroup$ – Wayne Werner Dec 4 '13 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.