From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Panicz Maciej Godek Newsgroups: gmane.lisp.guile.user Subject: Re: A couple of questions about goops method parameters Date: Sun, 7 Sep 2014 01:46:07 +0200 Message-ID: References: <1409905923.9245.5.camel@Renee-desktop.suse> <871trpridm.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <871trpkdbf.fsf@elektro.pacujo.net> <87bnqtiukx.fsf@elektro.pacujo.net> <878ulxgfa4.fsf@elektro.pacujo.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1410047187 26255 80.91.229.3 (6 Sep 2014 23:46:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Sep 2014 23:46:27 +0000 (UTC) Cc: Carlos Pita , David Thompson , "guile-user@gnu.org" To: Marko Rauhamaa Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Sep 07 01:46:19 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XQPgQ-0004Cw-DC for guile-user@m.gmane.org; Sun, 07 Sep 2014 01:46:18 +0200 Original-Received: from localhost ([::1]:36601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQPgQ-0003td-1C for guile-user@m.gmane.org; Sat, 06 Sep 2014 19:46:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQPgH-0003tY-HR for guile-user@gnu.org; Sat, 06 Sep 2014 19:46:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQPgG-0005Pn-DM for guile-user@gnu.org; Sat, 06 Sep 2014 19:46:09 -0400 Original-Received: from mail-vc0-x22c.google.com ([2607:f8b0:400c:c03::22c]:61924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQPgG-0005PD-7u for guile-user@gnu.org; Sat, 06 Sep 2014 19:46:08 -0400 Original-Received: by mail-vc0-f172.google.com with SMTP id hy10so474915vcb.3 for ; Sat, 06 Sep 2014 16:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zdoApnL1WGfb1r78mYTt6XYcyYOn/IavyJfXc8tOrMM=; b=Ln+DLqboqrv9xhjGRitzFlKnQJU3PvyPEfsh3xWg4QLmOV7wLqDnxlVxm3/Ou2nLb+ 51gbVSNbdO8aevdeMweoKfMk7u9cy41tAN6fXM+kc5KUdxsiVLVTYptTJCxHQ0m7M2zn 053hKKe94pircmAQa4/YU1LPoKRD0ZS3IR7+vejs/Iwiuv5ilT00eIcJR0SDu0lfHtfQ IAsfsxZIXX30WXsx+nu5pd7DuIHBWaII2uDfUNr52VOH/7X5l+Gvo2iMtiwom8xVlE4g c00ij4DftQ/CmlyUMbb6AQ8wNLSiZut7Ps7B7pX/hToSXtNNI/qVpk3J3tYguh4Lv6Xv NtPw== X-Received: by 10.221.49.133 with SMTP id va5mr2290407vcb.37.1410047167317; Sat, 06 Sep 2014 16:46:07 -0700 (PDT) Original-Received: by 10.221.66.79 with HTTP; Sat, 6 Sep 2014 16:46:07 -0700 (PDT) In-Reply-To: <878ulxgfa4.fsf@elektro.pacujo.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c03::22c X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11479 Archived-At: 2014-09-06 13:27 GMT+02:00 Marko Rauhamaa : > Panicz Maciej Godek : > >> However, I'd rather say that the lack of any type system in Guile is >> an inconvinience, because static type checking allows to avoid a huge >> class of software errors, and a good type system (like the one in >> Haskell) actually enhances language's expressiveness. > > We already have a satisfactory selection of languages with static type > annotation. The primary upside of static types is much faster code. The > downside is boilerplate and clutter that make it a huge chore to write > and maintain the code. Taylan already wrote a few remarks on that statement. Obviously, when you're talking about statically typed languages, you mean C, Pascal, and its derivatives. However, you're mistaken. Haskell or ML are also statically typed, but because of type inference, they do not introduce any boilerplate nor clutter. The fact that C compiler performs static type checking has nothing to do with its performance. It's only about detecting type errors. So for example if you have code like: short f(); long g() { return f(); } the compiler will generate an error. An alternative would be to compile according to specification and let the user worry about the problems caused by type mismatch (and I think that this is what the early C compilers were doing) > In my experience, high-level programming > languages allow you to accomplish more challenging feats with better > quality and productivity than statically typed languages. In addition to Taylan's remark, my experience is that in large programs it's very easy to make a type error, and it may take some time for that bug to manifest, and because of that latency such bugs become more confusing and harder to trace. Furthermore, having type signatures often make complex programs easier to read.