From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Ananya Krishna Maram <ananyakittu1997@gmail.com>,
Christian Couder <christian.couder@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] [Outreachy] git/userdiff.c fix regex pattern error
Date: Fri, 12 Oct 2018 09:57:25 +0200 (DST) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.1810120955090.45@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <xmqq7eiuwsm7.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Sun, 7 Oct 2018, Junio C Hamano wrote:
> And then there is an unnamed misdesigned language that has a
> regmatch() function, which takes a string that contains a regular
> expression, but somehow requires that string to begin and end with a
> slash for no justifiable reason ;-).
It makes more sense once you realize that /<regexp>/ is a very nice
syntactic construct to obtain an instance of a regular expression object,
rather than a string describing one.
In Perl it is not as obvious as in Javascript.
But in C, we do not have objects, so the way to describe a regular
expression is a string (which you have to compile into an opaque data
structure before applying it).
Ciao,
Johannes
next prev parent reply other threads:[~2018-10-12 7:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 11:30 [PATCH] [Outreachy] git/userdiff.c fix regex pattern error Ananya Krishna Maram
2018-10-04 14:26 ` Johannes Schindelin
2018-10-04 9:35 ` Ananya Krishna Maram
2018-10-04 15:26 ` Johannes Schindelin
2018-10-04 10:39 ` Ananya Krishna Maram
2018-10-04 19:42 ` Johannes Schindelin
2018-10-06 23:41 ` Junio C Hamano
2018-10-12 7:57 ` Johannes Schindelin [this message]
2018-10-12 8:41 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.1810120955090.45@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=ananyakittu1997@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).