zsh-workers
 help / color / mirror / code / Atom feed
From: Joey Pabalinas <joeypabalinas@gmail.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Cc: Taylor West <KrokodileGlue@outlook.com>,
	Joey Pabalinas <joeypabalinas@gmail.com>
Subject: [RFC] Looking for opinions on accepting refactoring patches
Date: Fri, 16 Mar 2018 10:39:30 -1000	[thread overview]
Message-ID: <20180316203930.f6mikhp7iiltgmpb@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2400 bytes --]

Recently I've become interesting in contributing to Zsh, and
have already been submitting a few scattered patches here and
there, but I will admit it's been a pretty trying experience
overall.

The reason is that many parts of the Zsh codebase are literally
_byzantine_labyrinths_ of single-letter identifiers and uncommented
shenanigans that were very confusing to figure out.

It seems I'm not the only one with difficulties understanding many
parts of the code, as a quick `git grep` for things like 'why' '??'
and 'what' reveal gems like:

> Src/Zle/computil.c:2850: * -->PLEASE DON'T ASK<--

> Src/Zle/complist.c:3431: * *** PLEASE DON'T ASK ME WHY THIS IS NECESSARY ***

> Test/E01options.ztst:879: # Goodness only knows why.

> Src/glob.c:2488: /* please do not laugh at this code. */

> Src/params.c:4167: /* ??? error checking */

> Src/hist.c:3196: * However, I'm so confused it could simply be baking Bakewell tarts.

> Src/Zle/computil.c-4240-
>
> * As there are virtually no comments in this file, I don't really
> * know why we're doing this, but it's to do with a matcher which
> * is passed as an argument to the utility compfiles -p/-P.

> Src/Zle/zle_tricky.c-1080-
>
> /* Lasciate ogni speranza.
> This function is a nightmare.  It works, but I'm sure that nobody really *
> understands why.  The problem is: to make it cleaner we would need       *
> changes in the lexer code (and then in the parser, and then...).         */

Most of the offending code is part of the completion subsystem, and
obviously being one of the central parts of Zsh, I can understand the
reluctance on changing anything but what is absolutely needed to
to avoid breaking things.

But in my opinion this is probably why I haven't noticed as many people
contributing to Zsh as I expect to (it really is an absolutely *amazing*
piece of software engineering in my opinion), so I was interested in
some comments about how patches concentrated only on refactoring the
code with semantics changes whatsoever would be received?

Is this something that would be encouraged? Or is the risk of bugs
and regression just too heavy for this to be a realistic goal?

Quite honestly I find either answers to be an understandable position,
thus I figured it would be better to ask about it before attempting any
patches like this.

-- 
Cheers,
Joey Pabalinas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2018-03-16 20:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 20:39 Joey Pabalinas [this message]
2018-03-17 11:27 ` Oliver Kiddle
2018-03-17 23:17   ` Joey Pabalinas
2018-03-17 23:39     ` Bart Schaefer
2018-03-18  1:48       ` Joey Pabalinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180316203930.f6mikhp7iiltgmpb@gmail.com \
    --to=joeypabalinas@gmail.com \
    --cc=KrokodileGlue@outlook.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).