Article View: comp.lang.perl
Article #1Re: Resources to learn common lisp?
From: Johann "Myrkraverk" Oskarsson
Date: Fri, 18 Sep 2026 15:39
Date: Fri, 18 Sep 2026 15:39
54 lines
3698 bytes
3698 bytes
On 9/18/2026 11:11 PM, boltar@caprica.universe wrote:
> On Fri, 18 Sep 2026 11:05:46 +0800
> "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> gabbled:
>> Has Bjarne thought to include PCRE2 in C++ already? Can we use a reg-
>> ular expression to match ' only if it's inside a word? Do we want to
>> account for Unicode single curly quotes too?
>
> Instead of ever niche academic circle jerking wrt C++ expansion, it
> would be
> nice if some more basic stuff was added first that other languages have
> supported since their inception. Eg, how about a switch() construct that
> operated on more than just POD types?
>
> std::string mystr = "hello";
> :
> :
> switch(mystr)
> {
> case "hello": ...
> case "world": ...
> :
> }
>
> etc.
>
> So long as the object had operator==() defined I see no problem with
> overloading
> switch in this way.
>
> The amount of times I've had to write endless if-else's instead of this
> I've
> lost count of.
I honestly agree with you. Stroustrup has added almost everything to
C++, so this lack of a generic switch () is astounding.
Now, by merely adding PCRE2 to the compiler, we can even extend this
syntax to A.W.K. like matching, for something akin to
switch( str ) {
case /re1/: ...
case /re2/: ...
}
but that's better left as an exercise /after/ we get more generic switch
() into standard C++.
After all, everyone should be familiar with this kind of pattern match-
ing syntax in Dtrace.
--
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Technical Details
Message-ID:
<CWcrS.267370$nBp.45689@fx02.ams4>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx02.ams4.POSTED!not-for-mailReferences:
<110a9pp$ckmk$6@dont-email.me> <87jyqdtumj.fsf@gmail.com> <tYQaS.4286$ZjVb.2337@fx12.ams4> <87bjbn2nhs.fsf@safunu.org> <ee5bS.4431$la89.3295@fx06.ams4> <877bm4zgsp.fsf@safunu.org> <gaNdS.82160$la89.71113@fx06.ams4> <1159f4c$26g2n$1@dont-email.me> <87se4mquld.fsf@nightsong.com> <115i4sf$uekh$1@dont-email.me> <874igxov3y.fsf@nightsong.com> <115n0v3$2h2oe$1@dont-email.me> <87zeyoo77t.fsf@nightsong.com> <116h0dv$2m9e2$1@dont-email.me> <m3WiS.4$UB1.1@fx15.ams4> <116hd1l$2qooi$1@dont-email.me> <LjXiS.420440$nUE4.251963@fx07.ams4> <116hgb5$2s4uh$1@dont-email.me> <87tsojm54k.fsf@nightsong.com> <116jmt4$3jrlq$1@dont-email.me> <87fr01mplp.fsf@nightsong.com> <87tsogiuxx.fsf@safunu.org> <expressiveness-20260827111602@ram.dialup.fu-berlin.de> <expressiveness-20260827113139@ram.dialup.fu-berlin.de> <gU1rS.86252$Pq3.1276@fx14.ams4> <118jkaj$1d9vr$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx02.ams4.POSTED!not-for-mail MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Resources to learn common lisp? Newsgroups: comp.lang.misc,comp.lang.c++,comp.lang.perl References: <110a9pp$ckmk$6@dont-email.me> <87jyqdtumj.fsf@gmail.com> <tYQaS.4286$ZjVb.2337@fx12.ams4> <87bjbn2nhs.fsf@safunu.org> <ee5bS.4431$la89.3295@fx06.ams4> <877bm4zgsp.fsf@safunu.org> <gaNdS.82160$la89.71113@fx06.ams4> <1159f4c$26g2n$1@dont-email.me> <87se4mquld.fsf@nightsong.com> <115i4sf$uekh$1@dont-email.me> <874igxov3y.fsf@nightsong.com> <115n0v3$2h2oe$1@dont-email.me> <87zeyoo77t.fsf@nightsong.com> <116h0dv$2m9e2$1@dont-email.me> <m3WiS.4$UB1.1@fx15.ams4> <116hd1l$2qooi$1@dont-email.me> <LjXiS.420440$nUE4.251963@fx07.ams4> <116hgb5$2s4uh$1@dont-email.me> <87tsojm54k.fsf@nightsong.com> <116jmt4$3jrlq$1@dont-email.me> <87fr01mplp.fsf@nightsong.com> <87tsogiuxx.fsf@safunu.org> <expressiveness-20260827111602@ram.dialup.fu-berlin.de> <expressiveness-20260827113139@ram.dialup.fu-berlin.de> <gU1rS.86252$Pq3.1276@fx14.ams4> <118jkaj$1d9vr$1@dont-email.me> Content-Language: en-US From: "Johann \"Myrkraverk\" Oskarsson" <johann@myrkraverk.invalid> Organization: Watcom Pro Ltd. In-Reply-To: <118jkaj$1d9vr$1@dont-email.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Lines: 54 Message-ID: <CWcrS.267370$nBp.45689@fx02.ams4> X-Complaints-To: abuse@easynews.com X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly. Date: Fri, 18 Sep 2026 23:39:12 +0800 X-Received-Bytes: 3370