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 later a 
newestModel 
shows up.


I do also agree that triple primes is a sign that your function should be 
split. 
On the other hand, 3 lines functions everywhere adds too much indirection 
and, IMO, are code smell as well.

Another things about primes, is that its used in calculus all the time as 
well and I feel nostalgic about it. Silly right?

What I really wish, is that things like type_ is used instead of type' but 
the ability for us to use primes on out variables name not be removed from 
the language.






On Wednesday, October 19, 2016 at 3:06:58 AM UTC-4, Peter Damoc wrote:
>
> 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 newModel. I did it and never looked back. 
>
> I found that if I needed more than one prime, it was a very good sign that 
> I might need to use functions. 
> Instead of naming my intermediary values something silly and useless like 
> model03, I named the process something meaningful and then chained the 
> processes with |> 
>
>
>
> On Wed, Oct 19, 2016 at 4:28 AM, mbr <mark...@gmail.com <javascript:>> 
> 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 I the only one here that feels 
>> this way ?
>>
>> For instance, I would have to write headerModel___ and headerModel__ 
>> instead of headerModel''' and headerModel''
>> In the prime case I count the 'while on the underscore case I will 
>> compare its length.
>>
>> at the end of the day, I will just skip the underscore and use number 
>> like headerModel03 and headerModel02.
>>
>> And my case for backticks, I understand it will make the andThen API 
>> easier, but why completely remove it from the language ?
>>
>> I guess my main question is, What is the motivation for their removal ?
>>
>> -- 
>> 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...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/
>

-- 
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 https://groups.google.com/d/optout.

Reply via email to