[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Check for redundancy
From: |
Stefan Nobis |
Subject: |
Re: Check for redundancy |
Date: |
Sat, 27 Jun 2015 09:40:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) |
Emanuel Berg <embe8573@student.uu.se> writes:
> Is it really that difficult for a computer to do this?
Depends on the question you ask. :)
IMHO the most interesting part would be to identify similar code
blocks (even using different functions and variables internally), that
can be refactored to a new, more generalized function with apropriate
parameters.
But this "similiarity" is quite difficult. In the general case you
could summarize all your code blocks into one single function and on
the other hand there might be quite some functions that are quite
similiar but should stay separated because this way the intentions are
better expressed and the the code using these function will be more
readable.
Therefore training an AI to produce really helpful recommendations
will be quite difficult, me thinks.
> The suggestion to have defuns byte-compiled individually and then
> just compare the result sounds much more straightforward.
This will give less false positives, but I think it will miss many
opportunities to refactor similar code blocks.
--
Stefan.
- Re: Check for redundancy, (continued)
- Re: Check for redundancy, Emanuel Berg, 2015/06/28
- Re: Check for redundancy, Emanuel Berg, 2015/06/24
- Re: Check for redundancy, Óscar Fuentes, 2015/06/24
- Re: Check for redundancy, Emanuel Berg, 2015/06/24
- Re: Check for redundancy, Óscar Fuentes, 2015/06/24
- Re: Check for redundancy, Emanuel Berg, 2015/06/24
- Message not available
- Re: Check for redundancy, Stefan Nobis, 2015/06/25
- Re: Check for redundancy, Andreas Röhler, 2015/06/25
- Re: Check for redundancy, Emanuel Berg, 2015/06/26
- Re: Check for redundancy, Emanuel Berg, 2015/06/26
- Message not available
- Re: Check for redundancy,
Stefan Nobis <=
- Re: Check for redundancy, Emanuel Berg, 2015/06/27
- Re: Check for redundancy, Emanuel Berg, 2015/06/27