Skip to content

Commit

Permalink
lens: mark as immutable-data-specific, not Haskell specific (#503)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
petertseng authored and ErikSchierboom committed Jan 19, 2017
1 parent 24e3e73 commit c798017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/lens-person/metadata.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
blurb: "(Haskell specific) use lenses to update nested records."
blurb: "Use lenses to update nested records (specific to languages with immutable data)."
common:
type: focus
focus: lenses

0 comments on commit c798017

Please sign in to comment.