From: Nala Ginrut <nalaginrut@gmail.com>
To: Panicz Maciej Godek <godek.maciek@gmail.com>
Cc: Guile User <guile-user@gnu.org>,
David Thompson <dthompson2@worcester.edu>,
Carlos Pita <carlosjosepita@gmail.com>
Subject: Re: A couple of questions about goops method parameters
Date: Sun, 7 Sep 2014 00:57:02 +0800 [thread overview]
Message-ID: <CAPjoZod_EYiB1wAL3vjWmnZpe_fvHW6LLaOARDR+Q91GCRtZnw@mail.gmail.com> (raw)
In-Reply-To: <CAPjoZoc7X7s+keog6avP62yvgJyQ3Ma_jomhw6xQq_rK9jnhVw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2283 bytes --]
2014年9月6日 上午4:10于 "Panicz Maciej Godek" <godek.maciek@gmail.com>写道:
>
> <dthompson2@worcester.edu>:
> >> 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.
>
Doesn't assoc-list fill the gap?
> 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.
>
I partly agree with you. For stateless makes things complex. Yes, it could
be complex.
But, no, it depends on need and scenario. The advantage of stateless is to
provide a more reliable and understandable system to users and maintainers.
If your system is constrained by hard realtime need, go ahead with
side-effect, it's cool. But most of the time, it's not the story from
reasonable users.
If you doubt stateless party exaggerated the truth, I'll recommend this
paper: <<Out of the tar pit>>
> 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.
It's fine if you think imperative is still cool in FP, me too, since most
people living in non-FP land.
But if you're expecting imperative way in FP land rather than learning and
trying it in FP way, why not choose non-FP lang for it? :-)
[-- Attachment #2: Type: text/html, Size: 2867 bytes --]
prev parent reply other threads:[~2014-09-06 16:57 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 2:05 A couple of questions about goops method parameters Carlos Pita
2014-09-03 15:49 ` Carlos Pita
2014-09-03 16:47 ` Marko Rauhamaa
2014-09-03 18:05 ` Carlos Pita
2014-09-03 16:20 ` Panicz Maciej Godek
2014-09-05 8:32 ` Nala Ginrut
2014-09-05 12:47 ` Carlos Pita
2014-09-05 19:03 ` Panicz Maciej Godek
2014-09-05 19:12 ` David Thompson
2014-09-05 19:35 ` Panicz Maciej Godek
2014-09-05 19:55 ` David Thompson
2014-09-05 20:10 ` Taylan Ulrich Bayirli/Kammer
2014-09-05 20:50 ` David Thompson
2014-09-07 10:33 ` Neil Jerram
2014-09-07 15:27 ` Taylan Ulrich Bayirli/Kammer
2014-09-05 20:10 ` Panicz Maciej Godek
2014-09-05 20:18 ` Taylan Ulrich Bayirli/Kammer
2014-09-05 20:37 ` Panicz Maciej Godek
2014-09-05 20:51 ` Marko Rauhamaa
2014-09-05 21:53 ` Taylan Ulrich Bayirli/Kammer
2014-09-05 22:26 ` Marko Rauhamaa
2014-09-05 20:44 ` Marko Rauhamaa
2014-09-05 21:08 ` Panicz Maciej Godek
2014-09-05 22:14 ` Marko Rauhamaa
2014-09-06 8:53 ` Panicz Maciej Godek
2014-09-06 10:44 ` Taylan Ulrich Bayirli/Kammer
2014-09-06 11:27 ` Marko Rauhamaa
2014-09-06 11:54 ` Taylan Ulrich Bayirli/Kammer
2014-09-06 23:46 ` Panicz Maciej Godek
2014-09-07 0:20 ` Marko Rauhamaa
2014-09-07 12:57 ` Taylan Ulrich Bayirli/Kammer
2014-09-07 13:58 ` Marko Rauhamaa
2014-09-07 16:46 ` Taylan Ulrich Bayirli/Kammer
2014-09-07 19:49 ` Marko Rauhamaa
2014-09-07 23:13 ` Taylan Ulrich Bayirli/Kammer
[not found] ` <CAPjoZoc7X7s+keog6avP62yvgJyQ3Ma_jomhw6xQq_rK9jnhVw@mail.gmail.com>
2014-09-06 16:57 ` Nala Ginrut [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPjoZod_EYiB1wAL3vjWmnZpe_fvHW6LLaOARDR+Q91GCRtZnw@mail.gmail.com \
--to=nalaginrut@gmail.com \
--cc=carlosjosepita@gmail.com \
--cc=dthompson2@worcester.edu \
--cc=godek.maciek@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).