|
I just tested with .NET 8, and the :Whatever: syntax works perfectly fine.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
OK, I've never seen it and I don't see it documented.
|
|
|
|
|
They are Unicode Character classes. They match the static methods on char in C#. They're supported on all major unicode regex engines i'm aware of as is [:characterclass:] on all posix engines
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: They match the static methods on char in C#.
Then I hope they don't call those static methods on each character as they go.
P.S. Maybe try changing it to the [\p{name}] form and compare?
|
|
|
|
|
Probably not. I have a 688KB C# file with all of the supported character classes and codepoint ranges. Unicode is big.
I imagine they have something similar.
As far as [\p{name}] I am vague on that form of expression but isn't it Unicode? The unicode one is already faster. The curious bit is ascii. I suppose I could try [:alnum:]
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Right, as far as I can tell [\p{name}] == [:name:] . But do they perform the same? They should.
|
|
|
|
|
I'll find out when I get a chance. Just based on the way I parse this stuff I'm assuming it will be the same.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
In the days of 7/8 bit chars, those class tests were often implemented in bitmaps (e.g. 8 classes in an array of 256 bytes)
A similar trick in, say, UTF-16 wouldn't be outrageous these days.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Are you using the source generators[^]? That should let you dig into the actual regex code to see the difference.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
OK. That's actually pretty cool.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
in the same header file, 5 lines apart.
<h1>define szSTATUS_DONE "D"</h1>
<h1>define cSTATUS_DONE 'D'</h1>
they represent the same status (and values)
(yeah, we use type prefix !! )
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
I use my prescient powers to see that you are going through someone else's code base.
Mircea
|
|
|
|
|
yeah!
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Trust me, it's much worse when you go through your own's and go: "What was I thinking!"
Mircea
|
|
|
|
|
thanks for your information
|
|
|
|
|
Things get complicated when we are not able to understand them clearly. The other possible reason can be Overthinking, which exaggerates a simple situation and makes it appear worse. A person ends up imagining certain situations which in reality won't happen.
|
|
|
|
|
Well, sometimes you are comparing strings and other times you are comparing characters.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
if only ...
both defines are used at max a dozen of times in places where performance is not required.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
szSTATUS_DONE [0]?
Paul Sanders.
If I had more time, I would have written a shorter letter - Blaise Pascal.
Some of my best work is in the undo buffer.
|
|
|
|
|
Job security? Or maybe someone was paid by lines of code?
The ‘why’ is almost always inscrutable, but likely the coder slept between sessions.
Cleaning someone else’s code is both satisfying and nerve wracking.
Good luck.
Time is the differentiation of eternity devised by man to measure the passage of human events.
- Manly P. Hall
Mark
Just another cog in the wheel
|
|
|
|
|
The compiler told someone that string -> char was a type mismatch upon comparison so they added the other def and used that one.
They did this for type mismatches for other values/variables too, sticking to their pattern.
At least, that's my forensic analysis of the crime of a previous coder.
A long time ago they were me, so we're intimate acquaintances without their knowing and I feel like I can predict some transgressions because I once made them.
It's like catching your kids sneaking out, isn't it? Sleepover at Susie's! psssh...
|
|
|
|
|
Yep: Empathy and understanding can lead to a more serene life.
Time is the differentiation of eternity devised by man to measure the passage of human events.
- Manly P. Hall
Mark
Just another cog in the wheel
|
|
|
|
|
Yeah I don't intend to be ugly about it.
What else is everyone in the raft supposed to do when someone says they'll prioritize themselves ahead as much as they want to everyone else's detriment?
|
|
|
|
|
jochance wrote: What else is everyone in the raft supposed to do when someone says they'll prioritize themselves ahead as much as they want to everyone else's detriment?
The rest of the survivors eat them first?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Two devs and a deadline? Looks like the results of a yet another successful death march. Code works, mission accomplished.
|
|
|
|