Haskell-like Function Types

399 views
Skip to first unread message

Meet Patel

unread,
Aug 26, 2016, 9:04:16 PM8/26/16
to julia-dev
Ok, so I was watching this talk, https://www.youtube.com/watch?v=gQ1y5NUD_RI and about 1:21:00 into the talk, the speaker, David Sanders states that Julia is inefficient at passing functions around. He said that the reason for this was because Julia has to do a type inference for each part of the function. What if the developer can type the function, like in Haskell.

In Haskell, we can have a type annotation like this:

adder :: Int -> Int

and this would symbolize a function that takes in an Integer and returns an Integer. What if a system in Julia was implemented that would do the same (or similar) thing. This would remove the need for the compiler to infer the types of each part of the function. 

Sorry, in advance, if anything I said in this post was stupid, as I am just learning Julia.


Yichao Yu

unread,
Aug 26, 2016, 9:42:25 PM8/26/16
to Julia Dev
On Sat, Aug 27, 2016 at 6:59 AM, Meet Patel <meet.s....@gmail.com> wrote:
Ok, so I was watching this talk, https://www.youtube.com/watch?v=gQ1y5NUD_RI and about 1:21:00 into the talk, the speaker, David Sanders states that Julia is inefficient at passing functions around. He said that the reason for this was because Julia has to do a type inference for each part of the function. What if the developer can type the function, like in Haskell.

Each function has it's own type on 0.5 now.

Meet Patel

unread,
Aug 27, 2016, 1:42:47 PM8/27/16
to julia-dev
When is 0.5 Stable coming out?

Tim Holy

unread,
Aug 28, 2016, 4:07:40 AM8/28/16
to juli...@googlegroups.com
In a sense, stable 0.5 already is out---it's been almost a whole week since
rc3 was released, yet there are only a couple of patches in the queue for
backporting:
https://github.com/JuliaLang/julia/issues?q=is%3Aissue+label%3A%22backport
+pending+0.5%22+is%3Aclosed

That's hardly anything compared to previous weeks (compare https://github.com/
JuliaLang/julia/pull/18156), and the best sign that rc4 will likely be the
last of the rcs and morph into the final release.

No promises, of course, but the bottom line is that even if there are more rcs
than currently anticipated, rc3 is ready for widespread use.

Best,
--Tim

Tony Kelman

unread,
Aug 28, 2016, 11:28:32 AM8/28/16
to julia-dev
You should also list PR's that are to be backported, so https://github.com/JuliaLang/julia/issues?utf8=%E2%9C%93&q=%20label%3A%22backport%20pending%200.5%22%20is%3Aclosed%20 but yes it's a much shorter list this time. I'll be starting the rc4 process today.
Reply all
Reply to author
Forward
0 new messages