This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Are types checked statically?


On 2017-03-16T10:23:24 -0700
Per Bothner <per@bothner.com> wrote:
> 
> Kawa does support JSR223, though the latter is not a good match for a statically typed language.

Good to know, thanks. I've heard this sentiment expressed (of JSR223)
elsewhere too.

> Kawa does type-checking at compile-time, and you can either compile in
> advance (to class files) or on-the-fly.
> You can fine-tune this to some extent:
> https://www.gnu.org/software/kawa/Options.html#Options-for-warnings-and-errors

Very nice! This is good news.

> Kawa does optimistic/lenient typing, though I'd be interested in
> adding an option for strict typing:
> https://www.gnu.org/software/kawa/Ideas-and-tasks.html#Optional-strict-typing-along-with-an-explicit-dynamic-type

I've not used Kawa yet, so I don't know how the current typing rules
feel. Stricter checking is typically a plus in my book though.

> Kawa currently doesn't have "function types" - the type of all
> functions is just 'procedure' without any specification of
> argument or result types.  However, the following is on the wish-list:
> https://www.gnu.org/software/kawa/Ideas-and-tasks.html#Optimized-function-types-and-values-using-MethodHandles

I'm not sure I understand this fully. I'm familiar with JVM internals,
including method handles, but the above is more an issue of efficiency
than of correctly checking the types of functions, isn't it? Unless I'm
mistaken, Kawa lambda expressions have the proper types and the types
are checked statically, right? They just may not have an efficient
underlying representation on the JVM.

M

Attachment: pgpeqbKYMLhOQ.pgp
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]