-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exercise lense-person #157
Conversation
Seems the Travis checks insist on Java 7? Why? Can we perhaps upgrade to Java 8? |
I think we should be able to update to Java 1.8. I can't think of why we should stay on 1.7 - especially since Java 1.8 has been out for so long. We will need to make sure there are no readmes or any text that indicates that 1.7 is the minimum version. |
I am working on updating .travis.yml to only include java 1.8. |
thx @ricemery |
I have updated the .travis.yml. Can you modify config.json and resubmit the pull request? Thanks @abo64 |
Thank you for the review and advice @ricemery |
Thanks @abo64 ! Looks good. On the build.sbt question. I have a bit of a mixed opinion on of Monocle and ScalaZ should be in the build.sbt. Lets leave them there since the example.scala needs the. And, since we are looking for a solution using lenses it makes sense to have Monocle at least in there. As far as the config.json entry, that is fine for now. The config.json entries need to be updated to include the difficulty, and topics. The entry you put in there is basically a placeholder for now. Thanks |
At the time it was added (#97), indeed [Haskell][haskell] was the only implementing track, and it was marked Haskell-specific. However, the [Scala][scala] track has also implemented this exercise. I predict it is confusing for Scala students to see "Haskell specific" in the list of the Scala exercises. The proposal is to change it to "specific to languages with immutable data". [haskell]: exercism/haskell#84 [scala]: exercism/scala#157 Lenses can be a fit for any language that has immutable data and data structures that can be nested. In such a language, updating a deeply-nested field can be a lot of work, but made easier with lenses. This exercise demonstrates the use of lenses and is applicable to **any** language with immutable data, not just Haskell. The alternative considered was to use "functional programming" specific, but the term "functional programming" is a little too broad. It's altogether possible that a functional programming language could have mutable data and a non-functional programming language could have immutable data, so let's be precise about where lenses are helpful. As of this writing, I do not believe any other exercise is language-specific. Questions to this effect have been asked in: * #352 * exercism/exercism#3113 If you are curious about having language-specific exercises, you may be interested in exercism/DEPRECATED.trackler#22.
I decided to use the Monocle library for the example. It seems to be the only lens library that also supports
Iso
(which is the intended way to implementsetBirthMonth
).