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 03/16/2017 10:02 AM, list+org.sourceware.kawa@io7m.com wrote:
Hello!

I'm looking for a scripting language that can be embedded into a Java
program (ideally via the JSR223 API, but this is not a hard
requirement). However, one of my requirements is static type checking
and that tends to limit the options somewhat. As someone who enjoys
functional programming, I was quite pleased to learn that Kawa existed!
However, I can't quite make out from the information on the site
whether or not the types are checked at compilation time or not. I
appreciate that the distinction is somewhat subtle if "compilation
time" actually means "when the script is loaded by the running program".

Kawa does support JSR223, though the latter is not a good match for a statically typed language.

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

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

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
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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