|
From: | Dmitry Gutov |
Subject: | Re: Instead of pcase |
Date: | Tue, 21 Nov 2023 03:09:08 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 21/11/2023 01:43, Po Lu wrote:
Dmitry Gutov <dmitry@gutov.dev> writes:Polling professional C developers on whether they are comfortable with advanced syntax inspired by high-level languages like ML or Haskell is pretty much a self-fulfilling prophecy. Ask a company of OCaml developers (we have at least one representative of such among active contributors), or even a corpus of experienced JavaScript developers, the results will be different.How many O'Caml developers are there? It's not plausible that they number greater than C developers (for that matter I don't think there's any O'Caml software on my computer).
OCaml -- maybe not that many. But the sum total of developers writing in high-level languages (JavaScript included) is quite high.
Ruby and Python have pattern matching in that style. Rust and Swift do too.JS might be getting one in a few years: https://github.com/tc39/proposal-pattern-matching
Java introduced limited/experimental support this year: https://openjdk.org/jeps/432
Even the C++ standard might get it one day: https://www.stroustrup.com/pattern-matching-November-2014.pdf (libraries already available)
[Prev in Thread] | Current Thread | [Next in Thread] |