Generic code working with reference types can be shared, but passing structs for generic parameters forces JIT compiler to generate separate instances of generic methods or classes for each combination of structs. From there inlining becomes trivial. But yes, being able to pull stuff like this is one of the cooler parts of .NET.
HN user
dfkf
That's a little bit too harsh. The solution is a no-brainer if you come from C#/Javaland, but if you don't... well, we get a nice illustration to the saying that "there are no stupid questions".
The answer is not just "var" because you have now completely dismissed local variable immutability (something C# does not have)
It is something that C# does have. It just doesn't allow immutable variables to be implicitly typed, i.e. you can't write something like "const var x = 0;" This lack of let or val in C# is a reminder that "var" was introduced in the language not just to reduce visual clutter, but to support anonymous types, which were in turn introduced to greatly enhance LINQ experience allowing for such nifty feature as "let" clauses in query expressions...
Autocratic states ultimately can't work with democratic ones. Its unfair to expect one group to 'follow the rules' and another to go off willy-nilly when it serves them.
Libya's "no fly" zone, Iraq, Kosovo, nationalistic coup against a democratically elected president.... etc etc etc
I don't even what to say when reading texts like this. It's like democracy is the racism of the 21st century. White infallible democrats versus autocratic niggers.
From the description, almost 90% of created tasks in this benchmark are tiny "leaf" tasks, which are quite likely to be optimized away completely. So it looks like the benchmark compares how well these compilers optimize one particular case, and not general performance of goroutines/tasks/whatever...
And who killed Paul Khlebnikov in 2004? He was a Putin-apologist and chief editor of Russia Forbes. Unfortunately, a lot of journalists die in Russia every year, and has been for the past quarter of century. Cherry picking some of them proves nothing.
"Why act like pointing out an obvious motive is the focus or even a main point of the report?" Because this motive is quoted in articles to link this crime to Putin. I certainly don't care about Lugovoi, Kovtun, their motives, was it even a crime and not an accident, involvement of the British secret services etc. etc. Britain should have known better when it welcomed all the dirty money from Russia...
"Fourth, the causes espoused by Mr Litvinenko – such as the FSB’s alleged responsibility for the apartment bombings, the war in Chechnya, and alleged collusion between President Putin and other members of his administration and organised crime – were areas of particular sensitivity to the Putin administration. "
"Finally, there was undoubtedly a personal dimension to the antagonism between Mr Litvinenko on the one hand and President Putin on the other. The history between the two men dated back to their (only) meeting in 1998, at a time when Mr Putin was the newly appointed head of the FSB and Mr Berezovsky and Mr Litvinenko still hoped that he might implement a programme of reform. In the years that followed,Mr Litvinenko made repeated highly personal attacks on President Putin, culminating in the allegation of paedophilia in July 2006"
That is from the report. Call me a Putin-apologist, an agent from Olgino, but these motives look like garbage. There is an entire industry of "making highly personal attacks" on Putin and blaming all kinds of things on him. The name of these "Putin's critics" is legion, they have been doing it for more than a decade, and they've had zero success... that is, of course, if by "success" you mean making Russians believe what they say, and not just selling shocking stories about the darkest secrets of the KayGeeBee to British tabloids...
No, it's mentioned in the article that their new IDE is just a frontend for R#.
And why would the US do such a thing? Denying poor crimeans who suffer under brutal Russian occupation these small pleasures of life...
There is no way to allocate objects of reference types on stack because references can easily outlive objects, leaving you with dangling references. And as I understand ByVal in VB.NET is redundant since it's the default option. It's just a leftover from VB6 where the default was ByRef. Crazy language.
Huh, author even uses exceptions as a part of normal workflow, instead of checking if "previousVersions" list is empty before calling Min on it he instead catches InvalidOperationException. I don't want it to look like an ad hominem argument, but... Anyway, C# authors had Java in sight when designing the language and after some contemplation they didn't include checked exceptions in the language. And their main argument is that in the vast majority of cases ignoring the exception and allowing it to propagate further up the stack is exactly what you want to do, simply because there is nothing you can do about it but to log it and tear down the entire object graph or write an error message to the user.
Videos of such experiments would be greatly appreciated.
It is one of those cases where you can actually leak memory with a GC. But at least Java gives (gave?) you a choice: to create a new string a use the current one, in .NET substring always returns a new string.
To author, please use "location.replace" instead of "location.hash". -avid pewpew player.
In what sense this introduction is alternative? It's just like every other intro that explains basic and easily understood things about the borrow checker, but doesn't go into details on how you actually live and work with the damned thing. The second thing you do after learning basics is trying to implement some simple data structures, like lists, or even (horror!) double-linked lists. In Rust this is the moment where you start hitting roadblocks, and then you read somewhere that implementing "basic" data structures in Rust isn't a basic exercise at all, and that is kind of discouraging.
There is no need to drag shale gas into this. Ukraine is a big country, even if very poor (for now). The economic part of the association agreement was especially damaging to the economic relationship between Russia and Ukraine. The EU played zero-sum game here, hoping (and not without reason) that the government will be forced to sign it anyway. It's just the whole thing escalated well beyond anyone would expect. Apparently, it was a mistake to impose such dividing agreements on an already deeply divided nation, the lesson the EU learned too late.
Cui prodest?
They are like Dogar and Kazon.
I think the poster means that c# has many functional features and F#, while being functional language at heart has lots of OO features integrated in it.
PS And the linked question only describes the limitations of Visual Studio where you can have only one language in a given project.
In the worst case scenario the time complexity of a hash table equals that of its bucket, which doesn't have to be a list. So the only advantage of the map over the unordered_map seems to be the ease of use, it only needs a comparer.
Only three rust benchmarks use unsafe code, in one of them it's virtually mandatory, and in another it's just one line. On a side note, rust compiler enforces naming conventions, which is kind of cute.
Bot google and facebook have very strong domestic competitors in Russia. So their withdrawal from the country would achieve exactly nothing.
https://github.com/stevebest/suicide/blob/master/suicide.md
Here you are. Posted by a Russian citizen from a commit labeled "Privet, Roskomnadzor!" Such a rebel! Demonstrating the world unspeakable horrors of the Putin's regime.
If you happen to use cyrillic in your source code (for comments or even strings) and constantly switch between latin and cyrillic, then this actually happens with а "c" letter, because both latin and cyrillic "c" occupy the same button. And that's not fun, btw.
Most of the features make the language more consistent and reduce syntactic noise, making it easier to read. The only feature that puts additional mental burden is the elvis operator.
It's Java's take on this. Java's version is somewhat longer, however.
public delegate void Action<in T1>(T1 arg1);
public delegate void Action<in T1, in T2>(T1 arg1, T2 arg2);
public delegate void Action<in T1, in T2, in T3>(T1 arg1, T2 arg2, T3 arg3);
public delegate TRet Func<out TRet>();
public delegate TRet Func<in T1, out TRet>(T arg1);
public delegate TRet Func<in T1, in T2, out TRet>(T1 arg1, T2 arg2);
public delegate TRet Func<in T1, in T2, in T3, out TRet>(T1 arg1, T2 arg2, T3 arg3);Handling of strings is way too complex for very little gain, but the rest - trailing commas, comments and no quotes for alphanumeric keys - are actually quite useful. They complicate syntax only a little, yet make writing JSON by hand much nicer. These small additions merely take us back to Javascript object initialization syntax, straitjacketed version of which Crockford called JSON.
Key piece: "In the past few days, Russian troops bearing the flag of a previously unknown country, Novorossiya, have marched across the border of southeastern Ukraine."
There were ten Russian soldiers from the border patrol who were detained by the Ukrainian army. They have been just released and sent back to Russia. Strange reaction by a country who is apparently under an open attack by Russia, isn't it?
This BS is getting tiresome. I really hope this won't end like in Georgia where a Georgian attack was justified by Russian armored columns pouring the the Kodori gorge. Only later, when nobody cared a report of the Fact-Finding Mission dryly stated that the Georgian claims "could not be substantiated". I really want Ukrainian (and not only Ukrainian) politicians to eat all the sh1t they have been throwing on the fan.
There actually is, if by Russia you mean Russian government. Support to "Novorossiya" simply can't achieve anything, perhaps only help it last a little bit longer. When Russia wanted to change the status quo it had legal excuses and it acted openly and forcibly. Half-measures take you nowhere.