-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coerce numeric types #3345
Comments
Duplicate of #2995. |
@trans Hey, you're back! |
@kirbyfan64 Hi! Yep, I've been heehawing about what new language to adopt for awhile. I narrowed it down just the other day when I decided I wanted a compiled language, nothing dynamic and no runtime VMs. That helped eliminated a few (otherwise good) choices like Clojure and Elixir, and left me with basically five options: Go, Rust, Julia, Swift and Crystal. The first two I decided are at a level a bit lower than I want to be working. For the moment Julia and Swift are still on my radar, but I need to get a project moving and I can leverage my Ruby skills, so Crystal. P.S. Holy smokes, talk about serendipity. The project I just started working on (with Crystal) is a site/blog generator. One of the options I was thinking of adding was dynamic page generation from JSON (as an alternative to full static generation). Well bite my code, I just checked out your blog and the first post I see explains how that's exactly what you are doing!!!!!!!!! Hot damn. Could I get access to your source so I can use it in my project? With any luck that'll save me a lot of time. And in exchange I'll fix your RSS problem :-) |
Uhh...doesn't Julia use a runtime VM?
:D FYI, we might want to discuss this off the issue tracker...
Wow, I just have to see this. |
Okay, email me (my address is listed on my github profile. I couldn't find yours.) I'm busy the rest of this week but should have time next week. And, oh yea, https://github.com/trans/brite.cr |
Take simple example:
Produces the error:
It must be possible for Crystal to coerce 42 into Int64 in cases like this. The error message makes it clear it knows what's up. Basically any IntX passed to an IntY parameter where X < Y, should be coercible by the compiler.
It would nice b/c it would let us remove a fair but of extra boilerplate in the form of
_i64
, and the like.Although perhaps there is better/more appropriate way to remedy this?
The text was updated successfully, but these errors were encountered: