|
Not sure what you're expecting here. IList has no knowledge of the type of its elements. Both the parameter to Add and the returned element of the indexer are typed as object? to be as wide as possible. You'd have the same problem here:
var lst = new List<int>();
IList ilist = lst;
ilist.Add("Lorem ipsum");
|
|
|
|
|
I expect what's the hype was about. I.e. for nullable reference to be the best thing since sliced bread!
|
|
|
|
|
Nullables can be extremely useful and the dotNet framework has done a good job of implementing them consistently. The reality is that it is extremely difficult, and I suspect impossible (thank you Kurt Gödel for the proof that no formal system is complete) for a static analysis to find all errors in code. This is why we debug code at runtime.
Bottom line, don't depend on any compiler to alert you to runtime bugs.
|
|
|
|
|
I would expect code that casts a List<string> to a IList to manage nulls.
If I just want to return a simpler interface, I'd cast to IList<string> .
|
|
|
|
|
Wow, really interesting example. My personal experience has been really positive with Null Reference Types, and it's caught many real world issues long before production, but good to have a cold reminder.
I guess I normally consider the point of NRT for me is that it increases the chance that the compiler at least puts the developer to the decision, so if it's a mistake it's a conscious one. This is a good example where that can't be guaranteed.
Let me try a counter argument to the IList example, if not only for my own sanity and shrinking NRT world view... So, the null was permitted, not because it was added to a collection of non-nullable strings, but effectively it was added to a list of explicitly nullable objects. Yes, explicitly is not so explicit yet, but hear me out. If you now try and pluck that null object out, and use it where a null is not permitted, I believe the compiler will realise, as your IList is actually IList<object?> , so the explicit typing is actually there, and so the compiler will save you at the last minute before the null actually becomes a problem. Based on this I think the behaviour we see is ok and probably by design.
string s = ilist[0];
As for the array, though...? B*gger, that's scary. Maybe a bug? Weirdly it recognises array as being string[]? after the line it's declared on, but then still does not generate a warning when reading that string? back into a new string .
EDIT: Just realised your Console.Writeline bits do demonstrate you reading it out. Are there any examples that don't involve array [] syntax? Maybe it's a bug worth raising?
modified 6-Oct-21 16:48pm.
|
|
|
|
|
|
|
At least they offer free returns!
Get me coffee and no one gets hurt!
|
|
|
|
|
Only 5 left in stock...better get it before they're gone.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
If it's a real color calibrated screen (for photo or video) , it can add up quickly.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Maximilien wrote: If it's a real color calibrated screen (for photo or video) , it can add up quickly.
Thanks for mentioning that. I was curious where the cost was coming from.
|
|
|
|
|
If you get a 2 TB hard drive, instead of 1 TB, the price drops to $2949!
|
|
|
|
|
But doing that also changes the processor. Probably changes other options as well, but I didn't look too closely
|
|
|
|
|
Aside from the parts, a big part of that price is probably this: Delta E<1, Pantone Validated. That means the color differential between pixels/colors is imperceptible to the human eye (perfect color is dE=0; the minimum perceptible differential is 1). Pantone Validated means it has exceptional color accuracy according to the Pantone Matching System of colors.
I'm not super informed on the details of all this but in general any high-end displays for artists are super expensive from what I've seen.
|
|
|
|
|
That's got to be a mistake, because if you choose the 4 TB hard drive, the price goes down to $4,999.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Select the 4TB hard-disk and the display goes back to 17" FHD
15.6" 4K UHD is only possible with 1TB
|
|
|
|
|
I still mourn my beloved EeePC 701. It still runs, but by today standards it's more crawling than running.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
The price comes from the screen and GPU. The Nvidia Quadro series of GPU's are specifically designed for video rendering, both real-time and post. The CPU and memory speed and amount of memory contribute, but it's primarily the GPU, screen, and availability.
NVIDIA QUADRO RTX 6000 (Desktop Version)[^]
[EDIT]
For spelling, or my lack there of.
"When you are dead, you won't even know that you are dead. It's a pain only felt by others; same thing when you are stupid."
Ignorant - An individual without knowledge, but is willing to learn.
Stupid - An individual without knowledge and is incapable of learning.
Idiot - An individual without knowledge and allows social media to do the thinking for them.
modified 19-Nov-21 21:01pm.
|
|
|
|
|
$3,870.11 Shipping & Import Fees
The shipping/import fees alone on that thing are more expensive than any computer I've ever bought.
|
|
|
|
|
For me any two, possibly three. My dad spent a comparable amount, 30 years ago though.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Well, in hindsight, I've probably spent $2500 on my most expensive PC ever...which has to be back 25+ years ago. With inflation, I'm not sure if that exceeds that $3.8K figure.
|
|
|
|
|
Unh? I don't think so.
Is this the way things are going?
Puzzled and dismayed.
|
|
|
|
|
Slow Eddie wrote: Is this the way things are going?
I really hope not, because I'm super cheap & I'm accustomed to hardware prices always going down, not up.
Plus, I would never need that kind of graphics solution.
|
|
|
|
|
Anything > 500 from asus I'd be suspect. I'm looking at my wife's lightly used laptop. The entire touchpad has delaminated from the top part of the laptop. The original install of the OS was so bad, well... but 10k? Insanity. Oh, don't buy Samsung appliances or laptops either.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
I am no expert on tracking pixels, but it seems to me these little pests are placed somewhere in the white background of web pages or emails. Because the background is white, these pixels are white so they would blend into the background and be virtually invisible.
But I like to run a dark theme on my browser and Outlook. Suddenly the bright white pixel sparkles like a little diamond against the dark background. Has anybody else noticed this? I find it a little annoying that good companies resort to this kind of spying!
It seems to be very prevalent. I get it in the emails from my chemist and on websites like the company that maintains our air conditioner.
I would love comments from members who know more about the topic than I do.
Get me coffee and no one gets hurt!
|
|
|
|