exercism / exercism/elixir-representer

What should and should not be normalized?

Aberta
#38 4 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Elixir
Estrelas
11
Forks
8
Merge médio
11d 3h
PRs com merge (30d)
1

Descrição

I thought it would be a nice idea to discuss ideas on things that should and should not be normalized. I sometimes have ideas and then I convince myself that it should not be done, or I open an issue and close it a bit later (ahem #36), so it might be good to have a trace of ideas.

Here are a couple ideas that I had. Mostly bad ones, but I want to explain why.

### All function arguments should receive a new placeholder 🚫

This is #36, but it is specifically mentioned in the documentation of something not to do. I thought that two people with the same solution that only differ with a variable name should represent the same way, but it's not true. If one of the solution has a variable name that is shadowing another, it could be confusing or bad practice, so it should be pointed out when it is.

### Anonymous functions should be represented the same way 🚫

The functions `&length/1`, `&length(&1)` and `fn x -> length(x) end` all do the same thing, so they could be represented the same way. However, the readability is quite different, so we might want to point out better options depending on context.

### Normalize functions order 🚫

The docs mention "[Normalize the order where insignificant](https://exercism.org/docs/building/tooling/representers/normalization)" so I thought we could reorder functions, but even the compiler has opinions on how functions with the same name and arity should be grouped together, so we shouldn't touch it.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.