Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #24593

Re: ANN: Ramda, a new functional programming library

From Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid>
Newsgroups comp.lang.javascript
Subject Re: ANN: Ramda, a new functional programming library
Date 2014-06-03 22:01 +0100
Organization Home
Message-ID <2PRbYy35ejjTFwYN@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <da2909bd-58cc-4183-8b3c-167039985491@googlegroups.com> <1wrr3wcXt2iTFwiZ@invalid.uk.co.demon.merlyn.invalid> <586acd4a-249d-4a91-a71a-9cd6187634dd@googlegroups.com>

Show all headers | View raw


In comp.lang.javascript message <586acd4a-249d-4a91-a71a-9cd6187634dd@go
oglegroups.com>, Sun, 1 Jun 2014 19:28:38, Scott Sauyet
<scott.sauyet@gmail.com> posted:

>Dr J R Stockton wrote:
>> Scott Sauyet posted:
>>
>>> I'm looking for feedback on a new functional programming library for
>>> Javascript that I've been developing with a friend.  [ ... ]
>>
>> If the library is not being written IN JavaScript (or even if it is),
>> you could consider implementing (maybe more efficiently) the improved
>> date object in <http://www.merlyn.demon.co.uk/js-dobj2.htm>. [ ... ]
>
>Although that looks to be interesting code, and an improvement on
>the existing Date constructor function in several important ways, I
>don't think it would be a good fit for Ramda.
>
>Ramda is about offering functional programming (FP) tools to the
>user.
> ...

Not only do I not understand how to use FP, I don't understand many of
the words used in writing about it.  And I doubt whether I ever will.

>DATE2 is an OO construct, a constructor function with a beefy
>prototype object.  It creates mutable objects, usually a no-no in FP
>code, and it carries a great deal of inaccessible internal state.
>These features are fine for OO, but not for FP.

Inaccessible internal state?  AFAIR, and you'll have noticed the date of
the page, there should not be any.  There is accessible state such as
DATE2.GMT, and there are internal variables in methods, and there is the
accessible date value.  Otherwise, could you name an example?

The beefiness to which you refer is, I think, because DATE2 handles for
I/O many standard date formats, including ISO week numbering and (IIRC)
YMD using a single Roman character for the month, I-XII or i-xii.  Also
it has to work round vexing features of the standard Object, such as
new Date(14, 7, 4)   giving the (UK) start of WWI rather than a date in
the Year of the Consulship of Pompeius and Appuleius (767 AUC).

I think it would look simpler if it were implemented not IN JavaScript
but BY those who have coded the JavaScript Date Object in whatever
language was used.

OTOH, the Object does not do as much as it could about the dates of
Summer Time (I've only recently discovered that the end of Summer Time
can depend on the date of Easter Sunday).



>I have a talk I've given several times discussing the ideas involved
>in functional programming as applied to Javascript. [1]

>[1] <http://scott.sauyet.com/Javascript/Talk/FunctionalProgramming>

Includes "Not available in current versions Javascript" on slide 22.
Trivial - needs an "of".  Important - Web pages persist, so there should
be a "current date" value given at the beginning.

-- 
 (c) John Stockton, nr London, UK.   E-mail, see Home Page.    Turnpike v6.05.
 Website  <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
 PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm
 Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-27 20:13 -0700
  Re: ANN: Ramda, a new functional programming library John C <rescattered@gmail.com> - 2014-05-27 21:00 -0700
    Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-28 04:37 -0700
  Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-28 04:36 -0700
  Re: ANN: Ramda, a new functional programming library "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-05-28 08:49 -0700
    Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-28 15:59 -0700
      Re: ANN: Ramda, a new functional programming library "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-05-28 16:15 -0700
        Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-28 17:05 -0700
          Re: ANN: Ramda, a new functional programming library Christoph Michael Becker <cmbecker69@arcor.de> - 2014-05-30 14:53 +0200
            Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-30 11:14 -0700
  Re: ANN: Ramda, a new functional programming library Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-05-29 19:40 +0100
    Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-29 17:55 -0700
      Re: ANN: Ramda, a new functional programming library Christoph Michael Becker <cmbecker69@arcor.de> - 2014-05-30 14:05 +0200
        Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-30 11:10 -0700
  Re: ANN: Ramda, a new functional programming library John C <rescattered@gmail.com> - 2014-05-30 06:25 -0700
    Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-30 11:23 -0700
      Re: ANN: Ramda, a new functional programming library John C <rescattered@gmail.com> - 2014-05-30 12:44 -0700
        Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-30 13:39 -0700
          Re: ANN: Ramda, a new functional programming library John C <rescattered@gmail.com> - 2014-05-30 19:17 -0700
            Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-05-31 09:52 -0700
              Re: ANN: Ramda, a new functional programming library Christoph Michael Becker <cmbecker69@arcor.de> - 2014-05-31 22:24 +0200
                Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-01 06:55 -0700
      Re: ANN: Ramda, a new functional programming library Christoph Michael Becker <cmbecker69@arcor.de> - 2014-05-31 21:00 +0200
        Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-01 06:54 -0700
  Re: ANN: Ramda, a new functional programming library Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-06-01 19:05 +0100
    Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-01 19:28 -0700
      Re: ANN: Ramda, a new functional programming library Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-06-03 22:01 +0100
        Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-03 19:15 -0700
          Re: ANN: Ramda, a new functional programming library Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-06-05 23:41 +0100
            Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-06 11:36 -0700
          Re: ANN: Ramda, a new functional programming library Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-06-07 23:13 +0100
  Re: ANN: Ramda, a new functional programming library billyroberts111@gmail.com - 2016-03-06 10:22 -0800
    Re: ANN: Ramda, a new functional programming library Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-06 17:52 -0800
      Re: ANN: Ramda, a new functional programming library "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-07 10:50 +0100

csiph-web