From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36082 invoked by alias); 16 Mar 2017 17:39:13 -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 36071 invoked by uid 89); 16 Mar 2017 17:39:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*Ad:U*kawa, H*M:info, book X-HELO: mail.io7m.com Received: from io7m.com (HELO mail.io7m.com) (159.203.63.34) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Mar 2017 17:39:11 +0000 Received: from copperhead.int.arc7.info (cust187-dsl61.idnet.net [212.69.61.187]) by mail.io7m.com (Postfix) with ESMTPSA id A6ED4187FA0; Thu, 16 Mar 2017 17:39:10 +0000 (UTC) Date: Thu, 16 Mar 2017 17:39:00 -0000 From: list+org.sourceware.kawa@io7m.com To: Per Bothner Cc: kawa@sourceware.org Subject: Re: Are types checked statically? Message-ID: <20170316173830.59958bf8@copperhead.int.arc7.info> In-Reply-To: References: <20170316170239.2e6b55d0@copperhead.int.arc7.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/cnDEXvEmxfJs23AiOqPUYXm"; protocol="application/pgp-signature" X-IsSubscribed: yes X-SW-Source: 2017-q1/txt/msg00080.txt.bz2 --Sig_/cnDEXvEmxfJs23AiOqPUYXm Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-length: 1594 On 2017-03-16T10:23:24 -0700 Per Bothner wrote: >=20 > Kawa does support JSR223, though the latter is not a good match for a sta= tically 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-e= rrors 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-ty= ping-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 --Sig_/cnDEXvEmxfJs23AiOqPUYXm Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature Content-length: 854 -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEgWja4isV0+3HIsI9DxW30G+oDLgFAljKzbIOHG1hcmtAaW83 bS5jb20ACgkQDxW30G+oDLi4CQ//d2qMzpKogLXk2Bcay5AVO11BXXd+zANZquhX dWY83wA3V+8TSDQCSTkM2KGjf40OKkVX2TY14beD3ehF8bSTmjaOMGS6Qs62QP4q C5MRNzTeZ134DYu6aNV5PNaa4lHO2Eb5o46tE2LA5ieO99pWA18vMbdXP/0jYMOy MtUUg+8ti7MHImL0mKu+omHfjh34P2Nu2whScQ26qI0gnPskpgfsUz9WCKmt3EF+ BmUAiH2ynXVnKAmQpHij6Yz9Y2U6S+O+mQJBBD+Gl9IPX3Qu1PZSiGIHdKishUqV 5ljxFLmRcXKoRm5RvNOBXZv+zJoCwswSbF2M1uYFABJvLMIcwn1kio4X7+tJjZA9 KeoQcSMwsfkcOXUWYZazVIFnDYwcQ9bsh94U+UvCaKe4VuvKY4H4gHtTVxZ6iWyi HtrtCshd7EKfKWzVtHfk/OmHCguGulmPtdNvDvx11zF1QK011LuQhATvX9tt1ghh RTwdUPQIjv0Mx43b4mDfABsX2YQYp7dpiQ0Wjpv8s6ix3NF/HCfAwktlwWbK5lhT MC24n1dW14z5m/gC180RYWwUiy83Hbyv+c36qs7osLayMJGX91vVFofYXT7meGMu rKWnWMrhKNLABkWVWcQ663jzDtNJxTD9hePAhItFvBkB6LVo8yylxuyFKVFWmPoa ONQhYQk= =RWVY -----END PGP SIGNATURE----- --Sig_/cnDEXvEmxfJs23AiOqPUYXm--