From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116455 invoked by alias); 16 Mar 2017 17:23:45 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 116427 invoked by uid 89); 16 Mar 2017 17:23:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*list, enjoys, hello!, site X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Mar 2017 17:23:43 +0000 Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1coZ7l-000576-Fz; Thu, 16 Mar 2017 18:23:41 +0100 Received: from 70-36-239-163.dsl.dynamic.fusionbroadband.com ([70.36.239.163] helo=localhost.localdomain) by mailfront12.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1coZ7W-0004oW-Pb; Thu, 16 Mar 2017 18:23:27 +0100 Subject: Re: Are types checked statically? To: list+org.sourceware.kawa@io7m.com, kawa@sourceware.org References: <20170316170239.2e6b55d0@copperhead.int.arc7.info> From: Per Bothner Message-ID: Date: Thu, 16 Mar 2017 17:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170316170239.2e6b55d0@copperhead.int.arc7.info> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q1/txt/msg00079.txt.bz2 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/