Crystal: Remove time related aliases in Int: year, month, day, second, millisecond, nanosecond

Created on 29 Jun 2018  路  7Comments  路  Source: crystal-lang/crystal

There are aliases related to time - the singular and the plural variant of Int#year, Int#month, Int#week, Int#day, Int#minute, Int#second, Int#millisecond and Int#nanosecond.

Note that Int#microseconds is only in plural

Related code: https://github.com/crystal-lang/crystal/blob/master/src/time/span.cr

Reference PR: https://github.com/crystal-lang/crystal/pull/6273

Most helpful comment

I'd prefer to keep them.

All 7 comments

Note that I wanted to remove them but nobody liked that. So the direction should be the other one: we should add the singular names back (remove the :nodoc: from them, and add millisecond).

Submitted as #6297.

I'm neutral here, either solution is fine.

Note that I wanted to remove them but nobody liked that.

There are 4 :+1: on #6273 but only 1 :-1:. Besides, only one other core member expressed an opinion - and that was neither in favor nor against it. So it's certainly not true that there was a strong opinion for keeping these aliases. In fact, it was only a single voice critizising the PR.

So please, let's have an open and friendly discussion about this topic.

I personally don't care much, and I'm fine with either solution. Maybe tending a bit towards removing the aliases, because they actually don't add much convenience.

I'd prefer to keep them.

This can be closed since #6297 has been merged.

Thanks @Sija

Was this page helpful?
0 / 5 - 0 ratings