|
Features are already being lined up for C# 7.2 and 8.0 including nullable reference types and limited multiple inheritance. Blittable is my new favourite word
|
|
|
|
|
Kent Sharkey wrote: and limited multiple inheritance.
Yes please!!!
One concern with this proposal is that it bloats the interface.
As opposed to bloating the concrete code because every implementor has to define the interface methods?
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Marc Clifton wrote: One concern with this proposal is that it bloats the interface.
As opposed to bloating the concrete code because every implementor has to define the interface methods?
Well you can sorta fudge it now at the cost of a layer of indirection.
public class MyClass : IFoo
{
public void Foo()
{
DefaultFooImplementor.Foo(this);
}
}
public class DefaultFooImplementor
{
public static void Foo(IFoo fooable)
{
}
}
I certainly won't say no to a cleaner implementation though.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Would anyone explain what on Earth that section with Span<T> and "ref-likes" was about? Their first point sounds like they think collections are thread-safe by default which is woefully not the case. Also simply pushing a type onto the stack does not make it immune to tearing.
Then they mention managed pointers not being allowed on the heap. First off, how would you store a reference type as a field inside a reference type then (see below)? Second, I know C++/CLI allows managed pointers on the GC heap (and the native heap too with an explicit GCHandle) and though C++/CLI isn't C# they're both .NET/CLR languages.
The third point is just sort of... true in general? Like yea, that's how stacks and heaps work. I feel like I'm missing something
void main()
{
A a = new A();
}
public class A
{
public B field1 = new B();
}
public class B { }
|
|
|
|
|
Jon McKee wrote: tearing If you can explain "tearing" to me then I might have an opinion.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
They seem to use it in a more general sense than I do but I define it as overwriting a memory location with partial data from two sources that are interleaving. For example if you have two threads that both write to the same memory location where one writes 0x12345678 and the other writes 0x87654321 you could end up with 0x12344321 or 0x87655678 because the CLR only guarantees atomicity of memory operations that are less than or equal to the system native pointer size. If that size is 32-bits and you write 64-bit values, you can "tear" the value on that 32-bit boundary. Note that you can also cause tearing if you manually alter the layout of an object because these atomic boundaries are not dynamic in relation to the object.
They seem to also include when a conceptually singular object de-syncs with itself like an array and its length property. Even if the data is atomic the operation on the class as a whole is not.
|
|
|
|
|
You mean duct-tape is useful even in programming? Awesome.
cheers
Chris Maunder
|
|
|
|
|
Span<T>, sounds to me like a range in C++ or slice in D and Rust. It comprises a pointer to the start of a span of elemnents, and the length of the span. Note that this is a pointer, ala C/C++, not a reference (as in most C# - I cannot recall every using an actual pointer in C#).
I suspect they intend Span<T> to be an immutable type, stored on the stack, so that any alterations actually yield a new Span. Because the type stores a pointer (not a reference) it will become invalid if ever stored on the GC heap.
For more info on pointer types, see Pointer types (C# Programming Guide) | Microsoft Docs[^]
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Quote: One of the new proposals for C# is to assume that all reference variables are non-nullable by default. Under the new syntax, you would need to explicitly indicate when a reference variable is nullable, just as you do for value types.
Because they want to see which update could break the most code with the smallest syntax change?
OK. This will be fun to watch.
cheers
Chris Maunder
|
|
|
|
|
A Russian-speaking hacking group that, for years, has targeted governments around the world is experimenting with a clever new method that uses social media sites to conceal espionage malware once it infects a network of interest. Oops, she did it again
I know I'd never think to look there.
|
|
|
|
|
Wall Street Journal is one of the most respected media outlets, which makes them eligible for setting up a paywall for articles. It means that only paying subscribers could read the articles on the website. There used to be a “first click free” feature on the WSJ that allowed first-time visitors to read articles for free, but it was removed in February as users were taking advantage of it by clearing browser cookies. The repercussions of removing the feature turned out to be bad for the website as the traffic dipped by nearly half along with the ranking on Google.
How dare Google stop directing people to content they're unlikely to be able to access.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Dan Neely wrote: How dare Google stop directing people to content they're unlikely to be able to access. That has an easy solution: hitting the "back button"
and I actually prefer that before getting publicity ads with malicious javascript or viri on sites I do am able to access.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I respectfully beg to differ. If I search for something, I don't want to waste my time visiting a myriad of links I cannot read before reaching one that is not behind a paywall.
Also, how the hell are Google supposed to index sites behind a paywall?
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Rob Grainger wrote: Also, how the hell are Google supposed to index sites behind a paywall? Free preview content? Google owns a "suscription" (you give me access or you don't appear in the search)? other things?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Rob Grainger wrote: Also, how the hell are Google supposed to index sites behind a paywall?
PayWalledCrappyContentByScumbags.con can identify spiders by IP or activity and feed them non-paywall restricted versions of the page to get indexed.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Oh boo hoo, WSJ. Get real!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Deployment of IPv6 is accelerating -- but it's home and mobile users that are benefitting from the performance improvements first, a new report says. I know, I keep hitting all those IPv6-only sites
|
|
|
|
|
Google's IPv6 report[^] offers more detailed breakdowns of data than that article. I'm a little bemused to see the author single out India for praise slightly over 20% adoption when Belgium is just under 50%, followed by Greece and the USA in the 30+% club, and Germany and Switzerland in the high 20s.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
The Puppet Labs State of DevOps Report 2017 shows that high-performing IT teams are deploying more frequently and recovering faster. DevOps company thinks DevOps is A-OK. More breaking news as it comes in.
|
|
|
|
|
Our tour of C# 7.1 continues with the proposals titled Infer Tuple Names and Pattern-matching with Generics. Electric Boogaloo version
|
|
|
|
|
Jonathan Allen is a very fine writer !
«Beauty is in the eye of the beholder, and it may be necessary from time to time to give a stupid or misinformed beholder a black eye.» Miss Piggy
|
|
|
|
|
Unless yesterday's announcement, I approve of all of these changes.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
'Asgardia' plans to launch a data storage satellite beyond the reach of Earthly laws—an ambitious and problematic goal. You call that off-site backup? This is off-site backup.
Send your data to infinity... and beyond!
|
|
|
|
|
Gosh you'd think data was radioactive.
|
|
|
|
|
As far as they don't need a manual reboot because communication breaks...
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|