Proposal draft

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Proposal draft

Vasantha Ganesh
Hello all,

  I've managed to write a proposal for the idea "Optimized function
types and values using MethodHandles"

Here is the first draft:

https://docs.google.com/document/d/1khL_gUy1-G7NDdJHTGNom3r2UXs8YTYEJNc-Ch0yuyo/edit?usp=sharing

Thank you,
Vasantha Ganesh K.
Reply | Threaded
Open this post in threaded view
|

Re: Proposal draft

Per Bothner
On 04/03/2017 07:15 AM, Vasantha Ganesh wrote:
> Hello all,
>
>   I've managed to write a proposal for the idea "Optimized function
> types and values using MethodHandles"
>
> Here is the first draft:
>
> https://docs.google.com/document/d/1khL_gUy1-G7NDdJHTGNom3r2UXs8YTYEJNc-Ch0yuyo/edit?usp=sharing

awesome-sauce-function :: int -> int -> bool
(define (awesome-sauce-function parm1 param2)
   (> (+ param1 param2) 0))

First, you have to realize that syntax would not "fit in" very well with
a language that uses Lisp syntax (even one with as many extensions as Kawa).
I think it would be quite difficult to parse.

Second, it's not needed.  Kawa already has a perfectly ok syntax for type signatures:

(define (awesome-sauce-function parm1::int param2::int)::boolean
   (> (+ param1 param2) 0))

This project is not about typing and checking of specific functions, which Kawa
does quite well.  It's about typing of function *expressions* and variables - for example
a function-valued parameter in a higher-order function.

I.e. to express things like: "I don't know the value of this variable, but I know it some
(unknown) 2-argument function that takes two ints and returns a boolean."

Sorry, I don't think this proposal is salvageable in the amount of time we have.
Maybe next year?
--
        --Per Bothner
[hidden email]   http://per.bothner.com/