exercism / exercism/elixir-representer

What should and should not be normalized?

Abierto
#38 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Elixir
Estrellas
11
Forks
8
Merge medio
11 d 3 h
PR fusionados (30 d)
1

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.