[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [el-search] How to search string excluding docstring?

From: Emanuel Berg
Subject: Re: [el-search] How to search string excluding docstring?
Date: Mon, 25 Dec 2017 20:36:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

t wrote:

>>>> Pattern match, like they have for
>>>> arguments in Erlang and SML?
>>> Pattern match like pcase, I guess.
>> Isn't that the same?
> No. Regexps are built to match regular
> languages. Pcase is built to match
> S-expressions, which are beyond regular.
> Well-nested parentheses are more than
> a regular language.

Regexps, you mean that is what they use to
implement pattern match in Erlang and SML?! Or
why did you bring it up?

I lost all my Erlang and SML (literally) but
I found some Haskell, the most neurotic of all
languages, which rely the most on pattern
matching virtually all the time - here is what
I mean:

    data Prop = DoNotCare | Pp Char
    instance Eq Prop where
      DoNotCare == DoNotCare = True
      Pp a      == Pp b      = a == b
      _         == _         = False
      a         /= b         = not (a == b)

Is this really what you mean? Surly that isn't
implemented as mere regexps?!


underground experts united

reply via email to

[Prev in Thread] Current Thread [Next in Thread]