|
The two last times time EU wasn't together were called World War I and World War II. The time before gave birth to names like "The 30 years war". And the time before that were called the Dark Ages.
See for yourself how good that would be...
GCS 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--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
"When you have eliminated the JavaScript, whatever remains must be an empty page." -- Mike Hankey
If a coffee bean is between the Earth and the Sun, is it a Java Eclipse? -- Sascha Lefèvre
/xml>
|
|
|
|
|
The EU does not exist to stop threats from Russia or any other 'outsider'. That's NATO's job and wouldn't be affected in the slightest by anyone leaving the EU. The job of the EU is to stop France and Germany beating the crap out of each other either militarily or economically. It can and will go on doing that even if every other member exits ... not that that is ever going to happen either.
I am not a number. I am a ... no, wait!
|
|
|
|
|
That would become a Fiexit I think, no ?
|
|
|
|
|
I think one of the S countries should leave. Sexit.
|
|
|
|
|
Now if we can just get Texas to leave the U.S.
We can call it Texit
Along with Florida
Which we will call Flexit
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
Async Properties?
Wouldn't it be cool if you could do this?
public async Customer SelectedCustomer
{
get { return _selectedCustmer; }
set
{
if (_selectedCustmer != value)
{
_selectedCustmer = value;
await GetCustomerAsync(_selectedCustmer);
}
}
}
If it's not broken, fix it until it is
modified 14-Apr-16 17:54pm.
|
|
|
|
|
|
Kevin Marois wrote: _selectedCustmer = value;
await GetCustomerAsync(_selectedCustmer);
Why? That's a horrible side-effect.
Marc
|
|
|
|
|
oops
_selectedCustmer = value;
await GetCustomerAsync(_selectedCustmer.ID);
If it's not broken, fix it until it is
|
|
|
|
|
That's what methods are for.
|
|
|
|
|
Think about it...
To fire an Async method from a property, you would first have to call a synchronous method that fires the Async method.
So essentially You have blocking call.
If it's not broken, fix it until it is
|
|
|
|
|
Yes, but I meant:
MSDN wrote: Do use a method, rather than a property, in the following situations.
The operation is orders of magnitude slower than a field set would be. If you are even considering providing an asynchronous version of an operation to avoid blocking the thread, it is very likely that the operation is too expensive to be a property. In particular, operations that access the network or the file system (other than once for initialization) should most likely be methods, not properties.
From Design guidelines, Choosing Between Properties and Methods[^]
|
|
|
|
|
And we know MSDN is always right.
There are many times when a property change triggers an async call. All Im suggesting is tha it start at the property
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: There are many times when a property change triggers an async call.
Actually, I tend to disagree. It's still a side-effect. A property setter should do only that -- set the underlying field value, which changes the state of the object for just that property. Doing anything else obscures the fact that the setter does something that potentially affects the rest of the application, or has additional hidden state changes of the object itself. If you really need an async operation, personally, I would code a method like await UpdateCustomer(selectedCustomer); , which is a lot clearer.
Marc
|
|
|
|
|
Ok, so the user drops down a list of customers. Requirements call for the newly selected customer to be loaded.
What calls UpdateCustomer(selectedCustomer)?
Combo bound to prop. Prop fires call to get Customer async.
Very common scenario.
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: Combo bound to prop.
Ah, an interesting use case! Yeah, now that I understand the bigger picture, I see what you mean. Gotta love (not) how .NET makes it so easy to entangle the view, controller, and model.
Marc
|
|
|
|
|
Marc Clifton wrote: Gotta love (not) how .NET makes it so easy to entangle the view, controller, and model.
The view is bound to the VM. That's how it's done. Not sure I get what you mean. You sound like you think this is a bad thing?
Of course you could wire up the combo's change event but that's just more code as apposed to a line of code in the prop's setter.
Not sure if I see one more advantages over the other.
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: The view is bound to the VM.
ah ok.
Marc
|
|
|
|
|
I'm confused. Isn't that the exact purpose of the INotifyPropertyChanged Interface?
|
|
|
|
|
|
Ahem. It's in the insider news page already.
This space for rent
|
|
|
|
|
Has this been confirmed?
The lack of a company name, and the fact that it appears to be based entirely based on a discussion in a chatroom, make it look like a prank.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
You know, I searched the lounge, not the insider. I shall now go to the woodshed for my beating .
Confirmed for this guy? No idea. I do know that all of the unix guys I worked with mapped the rm command to a shell script. Normally, the prompt would be something like "Are you really sure you want to do this?"
I've seen guys wipe the wrong folders. That damn command is fast, no time taken to calculate how long things will take.
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
|
|
|
|
|
Search the Help Wanted ads. If he's there, it's confirmed.
If it's not broken, fix it until it is
|
|
|
|
|
Nothing wrong with "rm -rf" at all if you know what you are doing and paying attention. Unix/Linux does not try to baby you like Windows does, so you have to be careful as root.
|
|
|
|