Op woensdag 26 oktober 2016 13:51:03 UTC+2 schreef Andrew Radford:
>
> Yeah but it does beg the question whether
>
> type''
>
> should become type__
>
The type' variable was in the 0.17 Html.Attributes package. I don't think
double primes are an issue there.
For other variables, that we define,
Yeah but it does beg the question whether
type''
should become type__
and of course suggesting a possible hell scenario when this goes further:
type__, type___, type ?!
Or, is that considered a code smell anyway so it should not be catered for?
On Wednesday, 26 October 2016 12:29:10
Never mind my question: type' will be type_
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit
The primes I currently use mostly in msg' and in model' in update functions.
It will take some getting used to, but not too bad I guess. I agree that
newModel
or similar is easier to read, so probably an improvement.
The backticks like in `andThen` I won't miss. It is probably more
consistent
For the record I loved using primes for the first time in Haskell - it gave
me the feeling of doing maths again, but while programming : )
I agree with your '_' point. Perhaps it should also be nixed following your
line of logic... But I love my underscore and forget variables also : /
On Sun,
> On Oct 19, 2016, at 2:59 AM, John Orford wrote:
>
> I am coming around to the make things as easy as possible for newbs approach.
>
> Elm is a big jump for people coming from JS, every little helps, including
> removing string syntax misinterpretations.
>
> Having
Primes can be confusing even when doing pure maths (I studied physics),
it's just so easy to miss them, so good riddance.
When it comes to model names, I always try to 1) pipe my functions so that
I need the least intermediate variable names and 2) use descriptive names
no matter what; for
Naming sometimes can be hard.
While I agree that model03 or model''' is a code smell.
But often you are just transforming some data and the intermediate
variables names are meaningless (besides reminding us that they are related)
I've seen things like newModel being used everywhere and then
I use primes surprisingly often as well since if I have "newModel" then I
probably also want "oldModel" rather than just "model" but I don't feel really
strongly about it.
I do, however, think that underscores would be worse than primes for API cases
where the normal identifier isn't available
Hey folks, this really should be on the dev list.
That said I agree with most of what's been said here. The place I'll miss
primes the most is actually the grammatical possessive: root'sValue, etc. But
that's not a huge deal.
--
You received this message because you are subscribed to the
Oh no, sorry for being confusing. You are 100% correct. That was a reaction
to myself having made such a silly mistake :-)
On Wed, Oct 19, 2016 at 5:04 AM, Janis Voigtländer <
janis.voigtlaen...@gmail.com> wrote:
> Nick, can you elaborate on why you think that my statement that foo
> `function`
Nick, can you elaborate on why you think that my statement that foo
`function` bar corresponds to bar |> function foo rather than foo |>
function bar is wrong?
2016-10-19 9:55 GMT+02:00 Nick H :
> N
>
> On Wed, Oct 19, 2016 at 12:34 AM, Janis Voigtländer <
>
N
On Wed, Oct 19, 2016 at 12:34 AM, Janis Voigtländer <
janis.voigtlaen...@gmail.com> wrote:
>
> 2016-10-19 9:27 GMT+02:00 Nick H :
>
>> The only situation where backticks are useful is when you are doing a
>> single function call, and "foo `function` bar" is
2016-10-19 9:27 GMT+02:00 Nick H :
> The only situation where backticks are useful is when you are doing a
> single function call, and "foo `function` bar" is easier to read than
> "function
> foo bar". I haven't seen this crop up too many times. But if it does, "foo
>
Re: primes. Totally agree with Peter. One prime is kinda nice for a
temporary variable, but beyond that... you can add a short word to your
variable name, and then you won't have to do any counting!
Re: backticks.
Evan's explanation from elm-dev:
The backtick syntax is neat, but ultimately, it
Elm optimizes for learning and in doing so, encourages people to write
clear code.
I too had a brief love affair with primes after watching Leslie Lamport
videos about TLA+ and discovering that they are allowed in Elm.
I was encouraged to move away from them and favor a more explicit name
like
I am coming around to the make things as easy as possible for newbs
approach.
Elm is a big jump for people coming from JS, every little helps, including
removing string syntax misinterpretations.
Having said that, I suspect a total programming newcomer would find Elm
right now easier than JS...
Agreed; I'll definitely miss being able to use primes in variable names!
martin
On Tue, Oct 18, 2016 at 6:28 PM, mbr wrote:
> just learned that primes and backticks won't be on elm 0.18.
>
> What are the reason for their removal?
>
> I will miss the primes quite a bit. Am
18 matches
Mail list logo