🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Johann "Myrkraverk" Oskarsson Fri, 18 Sep 2026 15:39
Re: Resources to learn common lisp?
#1
Author: Johann "Myrkraverk" Oskarsson
Date: Fri, 18 Sep 2026 15:39
54 lines
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 ( ;; ) _:;
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads