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: Fri, 5 Sep 2014 22:10:26 +0200 Message-ID: References: <1409905923.9245.5.camel@Renee-desktop.suse> <871trpridm.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1409947850 6873 80.91.229.3 (5 Sep 2014 20:10:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Sep 2014 20:10:50 +0000 (UTC) Cc: Carlos Pita , "guile-user@gnu.org" To: David Thompson Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Sep 05 22:10:45 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 1XPzqF-00075D-Ti for guile-user@m.gmane.org; Fri, 05 Sep 2014 22:10:44 +0200 Original-Received: from localhost ([::1]:60020 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPzqF-0000j0-Bc for guile-user@m.gmane.org; Fri, 05 Sep 2014 16:10:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPzq0-0000ij-VK for guile-user@gnu.org; Fri, 05 Sep 2014 16:10:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPzpz-0003wf-N9 for guile-user@gnu.org; Fri, 05 Sep 2014 16:10:28 -0400 Original-Received: from mail-vc0-x232.google.com ([2607:f8b0:400c:c03::232]:56118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPzpz-0003wZ-Hk for guile-user@gnu.org; Fri, 05 Sep 2014 16:10:27 -0400 Original-Received: by mail-vc0-f178.google.com with SMTP id la4so13152145vcb.9 for ; Fri, 05 Sep 2014 13:10:27 -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=5taJNtks+gtaiqZf3f/hDsid4mMedCKKs6xwz6mthDc=; b=Y0ZN1KtPTtyLA/P6IYoRPJ5NYWy00VZNk3MmU7QCmgR00aw7a2ql518Qrvo+5HAAzx k7PAAXVi9UaIJxGAIDCby07czuGCOlUZuJ5bTF1BDv/14JLgqrnrRgc3BNJD2+fsgvjz 11WraqWy/Cq3JijO2hjmF7XIwXR4N1jbab/1r/BKdR9nKAorX6AzdA7oJEUn3+2A78c1 YUyjoROw3S5BUviyK5x027SqHzicZscZLy4GfC4+EB3J9pnAD9Q2PnmCXc0yRwqqm/f9 tLcfWGLT/i//BuoIsNxtsIRugdgYyoww2CjEeUtiWQXVj6ibLEFMTXXaHiyV4Im6qqWF cahw== X-Received: by 10.52.166.80 with SMTP id ze16mr2294434vdb.59.1409947826962; Fri, 05 Sep 2014 13:10:26 -0700 (PDT) Original-Received: by 10.221.66.79 with HTTP; Fri, 5 Sep 2014 13:10:26 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c03::232 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:11464 Archived-At: : >> http://elm-lang.org/learn/What-is-FRP.elm >> >> Using FRP, we can model with mutable state in a pure, functional way. OTOH, when you take a look at the example code (Mario), you can trace the notion of objects. E.g. mario = { x = 0, y = 0, vx = 0, vy = 0, dir = "right" } What else is that, if not an object? "Well, it's a structure", one could say -- because it has no methods. However, this is just what the most rudimentary GOOPS objects are -- a named tuple (provided that you use no virtual slots). I think that it is a big problem of Scheme, that it does not have any noncontroversial and commonly accepted way for creating named tuples. Furthermore, instead of using explicit side effects, as one would normally do, the Mario example first defines a step function, and calls "foldp step mario input". Although I do appreciate efforts like in "How to Design Worlds" book or "Introduction to Systematic Program Design" course, to avoid explicit mutation (because as SICP shows, it complicates the model of computation), I don't see so many benefits of avoiding mutation in complex realtime systems. Actually, when I look at the Mario example, I have a feeling that the code would be much cleaner and easier to follow if it was written in a more traditional imperative/callback style.