INRIA / spoon

Spoon is a metaprogramming library to analyze and transform Java source code. :spoon: is made with :heart:, :beers: and :sparkles:. It parses source files to build a well-designed AST with powerful analysis and transformation API.
http://spoon.gforge.inria.fr/
Other
1.76k stars 352 forks source link

refactoring: naming and typos in code #2207

Open zielint0 opened 6 years ago

zielint0 commented 6 years ago

There are many typos / errors / misspellings that

I hope there are no obstacles to fix them (API compatibility?)

I would like to go forward and FIX them all.

@surli Any opinions?

surli commented 6 years ago

I hope there are no obstacles to fix them (API compatibility?)

Actually yes this is a problem. For me typo are the least problem we have in Spoon. We might be more careful when reviewing the code to avoid them as much as possible, but existing typo are not harmful as long as everything is well documented. Fixing them might led to API breaking changes that we really do not want.

I would say that the only moment we might be able to fix them is before a major release: then if we already break some things we might agree on breaking more things for a good reason.

In the meantime I'd keep the typo.

zielint0 commented 6 years ago

@surli

Just remark: while developing software, I observed that code rot starts from small things (like typos, formatting, etc.). Then bigger flaws follow (broken window). Removing any flaws (sacrificing backward compatibility) imho pays in the long run. I know, sounds terrible! ;-)

Also, what is counterintuitive, typos have many disadvantages.

This is counter intuitive but typos in practice makes development slower (one has to learn and remember misspelled names of variables, functions, classes), make attacks easier (see Zerocoin case) and make code looking unprofessional.

zielint0 commented 6 years ago

CtRole.java: ANNONYMOUS_EXECUTABLE -> ANONYMOUS_EXECUTABLE

I tried, but no luck so far.

https://github.com/INRIA/spoon/pull/2219 https://github.com/INRIA/spoon/pull/2220

pvojtechovsky commented 6 years ago

@zielint0 can we close this one?

zielint0 commented 6 years ago

I would like to fix few more until 2019 and close it myself. This is not abandoned nor forgotten ;-)