Alex Craft
Alex Craft

Reputation: 15336

Any way to enable Float and Int in Crystal?

In my code I never use anything other than Int32 or Float64.

Yet Int and Float are not working in Crystal and I always have to type 32 and 64 at the end which is annoying.

Is there any hacky way to enable usage of Float and Int?

Upvotes: 0

Views: 106

Answers (1)

You could use type aliases, e.g., alias Int = Int32.

Upvotes: 2

Related Questions