Haskell-like Function Types

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Haskell-like Function Types

Meet Patel
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.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Haskell-like Function Types

Yichao Yu


On Sat, Aug 27, 2016 at 6:59 AM, Meet Patel <[hidden email]> 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.
 

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.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Haskell-like Function Types

Meet Patel
When is 0.5 Stable coming out?

On Friday, 26 August 2016 21:42:25 UTC-4, Yichao Yu wrote:


On Sat, Aug 27, 2016 at 6:59 AM, Meet Patel <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="wQC7XWJuAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">meet.s....@...> wrote:
Ok, so I was watching this talk, <a href="https://www.youtube.com/watch?v=gQ1y5NUD_RI" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.youtube.com/watch?v\x3dgQ1y5NUD_RI&#39;;return true;" onclick="this.href=&#39;https://www.youtube.com/watch?v\x3dgQ1y5NUD_RI&#39;;return true;">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.
 

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.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Haskell-like Function Types

Tim Holy
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

On Saturday, August 27, 2016 10:42:47 AM CDT Meet Patel wrote:

> When is 0.5 Stable coming out?
>
> On Friday, 26 August 2016 21:42:25 UTC-4, Yichao Yu wrote:
> > On Sat, Aug 27, 2016 at 6:59 AM, Meet Patel <[hidden email]
> >
> > <javascript:>> 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.
> >
> >> 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.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Haskell-like Function Types

Tony Kelman
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.
Loading...