Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #24675
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| 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 | Sat, 7 Jun 2014 23:13:30 +0100 |
| Organization | Home |
| Lines | 56 |
| Message-ID | <BqqGh8OK64kTFwVY@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> <2PRbYy35ejjTFwYN@invalid.uk.co.demon.merlyn.invalid> <d3bc8230-d5ec-4bf6-8cc6-5102cf3a4cc5@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain;charset=us-ascii |
| Injection-Info | mx05.eternal-september.org; posting-host="01da9e6251d9b3ee47bb70bebae42d53"; logging-data="23322"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lFwMiasQ22yUW7yudSTcVbiuZJ2j1XLs=" |
| User-Agent | Turnpike/6.05-S (<hY+ExRCkcsssDA9uJ+0bCn8+UA>) |
| Cancel-Lock | sha1:wpT7A8iKvrLqG2hC006Vwsq9xK8= |
| Xref | csiph.com comp.lang.javascript:24675 |
Show key headers only | View raw
In comp.lang.javascript message <d3bc8230-d5ec-4bf6-8cc6-5102cf3a4cc5@go oglegroups.com>, Tue, 3 Jun 2014 19:15:43, Scott Sauyet <scott.sauyet@gmail.com> posted: >Dr J R Stockton wrote: >> Scott Sauyet posted: >>>Dr J R Stockton wrote: >>> 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? > >I probably mispoke. There is a real difficulty, in fact a near >impossibility before ES6, in efficiently working with entirely >encapsulated data that is still avaialable to prototype functions. >So there is not likely to be totally inaccessible internal data that >is used by these prototype functions, but the internal Date object, >`this.Q` looks to me like something one *had better not* manipulate >for fear of undermining the integrity of the DATE2 object. Am I >mistaken about that? I hope so. Q should be the only internal state of the Object, and if it is written to directly in the middle of a piece of code the effect is the same as writing code with an object D of the built-in Date Object type and throwing in a D.setTime(x). The DATE2 object is equally healthy after that, but represents an altered value. A degree of protection of Q against simpler minds might be obtained by replacing it in the code with ?, which this mail system will probably mung - it is the last letter of the real name of the capital city of Greece, U+0391 - and in the comment and documentation with U+0410. Readers can either use the Object with a little care, or take parts from it; or, if strategically placed in the industry, implement it in the same manner as the ordinary Object but with some different statements in the code. The page was intended mainly to show that a DATE2 Object could have many more methods than a Date object - useful ones such as ISO Week Numberihg Dates and Easter Sunday, and less common ones such as single-character month fields. Remember that my mind runs on ECMA 262 3rd Edn (& CSS 1), and is unlikely to be much upgraded. -- (c) John Stockton, nr London UK Reply address via Merlyn Home Page. news:comp.lang.javascript FAQ <http://www.jibbering.com/faq/index.html>. <http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources. <http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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