This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Proposal draft
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
per@bothner.com http://per.bothner.com/