|
That looks interesting
|
|
|
|
|
one day you will be a nifi ninja
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
At least you'll have lots of $'s.
"Go forth into the source" - Neal Morse
|
|
|
|
|
LOL. Contract ending in a few months, then they'll* renegotiate my salary...probably downward.
*Either my current company gets the contract and nothing changes, or a new company gets it, and all bets are off.
|
|
|
|
|
Joke heard by a Ships Officer about secret service organisation (7)
May be Too easy !!!
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
GESTAPO?
Joke heard JEST ->
GEST
by a A
Ships Officer PO - Petty Officer?
about
secret service organisation
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
modified 16-Sep-20 6:45am.
|
|
|
|
|
You are up tomorrow
OriginalGriff wrote: Ships Officer PO - Petty Officer?
It is correct.
Felt it was stretching a bit?
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
Nope, just wasn't sure when I initially posted it.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
But I got caught by a guard.
He was not mad, but he was very disappointed.
Man, I can't believe I let my guard down like that...
|
|
|
|
|
You're not the Messiah, you're a very naughty boy!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
I felt I had just seen a trailer for an upcoming exotic new bicycle frame that will be faster and lighter, they said: its design optimized by aerodynamic wind-tunnel testing, and containing many subtle improvements over any bicycle frame ever designed, not to mention correcting many flaws in previous designs which were never admitted to, publicly.
It's made of novel combinations of rare-earth minerals, carbon fiber, and graphene married to buckyballs [^] by amazing new software and hardware nicknamed by the team: VEIVW, "Virtual Elvis Impersonator Vegas Wedding."
There are no wheels, yet, and previous wheels cannot be reused on this frame. The team, however, is optimistic, and states they are expecting to have wheals ready in some months, or so. And they express strong conviction the equally improved wheels will be more, or less, round.
p.s. the permutations of mutability and immutability that will be possible with the new Record Type, and Class Property qualifiers, combined with existing aspects of mutability and immutability in Structs and Classes ... makes me ... dizzy.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
I, too, share your enthusiasm or, perhaps I daresay, I do even surpass it!
Oops, misread it, I mean I am enthusiastic! legit!
modified 15-Sep-20 22:19pm.
|
|
|
|
|
Some nice stuff overall from what I've seen (new() and delegate* unmanaged ), but I really don't understand how a lot of the pattern matching updates in the last few C# releases are supposed to be useful. Why do we need a is not null when we've had a != null forever (and it's shorter to type)?
|
|
|
|
|
It helps prevents null reference exception at compile time
|
|
|
|
|
Does it? I can't test C#9 at the moment but for the normal equality comparison:
bool F(object x) => x is null;
ldarg.1
ldnull
ceq
ret
bool F(object x) => x == null;
ldarg.1
ldnull
ceq
ret
If it was a compile-time check there would be no need to do anything except ldc.i4.1 or ldc.i4.0 in the body of the resulting IL. I imagine the is not and != decompile to something similar.
Or maybe I'm misunderstanding you
|
|
|
|
|
what I will say is just an educated guess since I din't investigate it closely...
I don't think they change the runtime for that.. method signature is the same...
So.. not only there is a compile time check provided by this new syntax, but the compile also produce IL code which verify the parameters as well so that it accepts only non null (or nullable), as specified...
i.e. your method that requires non null parameter will never throw a null reference exception (from the argument anyway) even if called with, say, reflection / dynamic or such like...
|
|
|
|
|
Jon McKee wrote: Why do we need a is not null when we've had a != null forever (and it's shorter to type)?
It's been added for consistency. What's new in C# 9.0 #pattern-matching-enhancements[^]
Personally I feel that instead of using (MyVariable != null) or (MyVariable is not null) or any variations thereof, one could use (MyVariable is object)
I'm not very fond of negations.
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
I like the variable is object notation And yea, I guess it's a byproduct of adding not that we get yet another way to test for null.
Some TIL if interested:
I've been playing around with the various ways to perform these checks and it turns out it's all stylistic choice from an IL perspective[1]. Any check equivalent to != null gets translated to ldnull and cgt.un (including is object ) and any check equivalent to == null gets translated to ldnull and ceq .
[1]: Except if the equality operator is overloaded in which case is forces the default equality operator (and the IL above) whereas == and != use the overloaded operator via call bool X::op_Inequality(class X, class X) .
modified 16-Sep-20 3:44am.
|
|
|
|
|
The best part is that (MyVariable is object) can be enhanced to (MyVariable is MyClass) and now we have a really proper sanity check
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
To be fair that might be a little confusing for the uninitiated. Checking that a variable/parameter is the type it's defined as looks weird.
|
|
|
|
|
And normally it wouldn't be necessary either, C# being a typed language and all that.
But there are cases when using inheritance or interfaces when it makes sense.
I find it's a good habit though.
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
Jörgen Andersson wrote: I'm not very fond of negations. It's the double negations masquerading as affirmations trip me up.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
I'm never not against those negations... um...
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
What's wrong with the way C++ does it?
if (myobj) {
}
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
#realJSOP wrote: What's wrong with the way C++ does it?
Nothing really.
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|