|
Var should be used whenever the type is obvious from the RHS. Most of the time, nobody cares about the specific type of a variable, yet explicitly declaring the type forces maintainers to read it 100% of the time. It's also less DRY: it would be silly to say, "Today I washed my car today".
The counterpart is a newer feature that lets us instantiate without the explicit type, which arguably should only be used when the type is obvious:
private Dictionary<string, ienumerable<int="">> _lookupTable = new();
|
|
|
|
|
I used to explicitly type all my variables until recently when it seems to have become fashionable in my department to use var . I don't normally follow coding fashions unless they make sense, and this sure makes the code look cleaner. And as long as IntelliSense knows what type it is and shows me the correct properties and methods, I'm happy.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
In what way would the underlying type change? I believe that it is a change solely to the warnings/errors produced by the compiler. Although I guess some code copied from Stack Overflow may break
I've wanted this since C# 1.0. Any run-time error you can prevent at compile time is something that I'm for, although with all the semantic sugar they're adding, I'm worried about diabetes.
I agree it's best for greenfield, I'll bet most older projects aren't updated.
I wish they had made it optional by a postfix ! instead the way they did way back when with a preprocessor, but I see that acting a lot like the const poisoning that happens with C++ when you make something const so I understand why they just yanked off the band-aid.
Ralph
|
|
|
|
|
It has come to my attention that you did not read the memo.
I do not know what to tell you. We all did a zoom call and agreed on this months ago.
|
|
|
|
|
Did I ever mention why I hated MSFT? and most of their products?
THIS. Exactly This!
The last straw was when they stopped adding changes to the 16 Bit C/C++ compiler that they were putting into the 32 bit version. Our lead dev made a 32 bit library that we were forced to write a Thunking layer to use. He used almost every new feature he could. In the end, I forcibly recompiled the code using a Borland 16 bit compiler.
The ONE thing I LIKED about Oracle was that for DECADES we would simply DUMP our DB and Code.
Import it into a newer version, and it worked. Hundreds of upgrades, and we barely ever ran into something that no longer compiled.
Something I can honestly say NEVER happened with MSFT stuff. From VB breaking every version, to the above, to MSSQL T-SQL changes. (Heck, SqlCmd has a :Connect command. Try to use it in Azure hosting! Because it does NOT support choosing the Database. So it fails. It's as if ONE HAND has no idea what the other is doing).
Good ideas are great... But going in to make a small change to a system, and finding out you cannot even begin to recompile it because of the new compiler. Imagine if Linux was built on those precepts!
I feel your pain!
|
|
|
|
|
I used to criticize MSFT. Then I built a few projects with NPM libraries and felt the true pain of uncoordinated independently maintained software tools and libraries from everyone wanting to contribute a weekend project and then move on. Suddenly MSFT seemed like the best thing every. One company to address security and ensure all of your dependencies are upgraded at the same time and work together is heaven compared to the past several years of "free" libraries.
Who am I kidding, I still criticize MSFT. But a lot less now.
|
|
|
|
|
|
@Ravi-Bhavnani You may be interested in this one.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
|
|
I swear I used the archive 3 hours ago.
Nevermind, it was another archive.
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
modified 16-Mar-22 10:20am.
|
|
|
|
|
Slacker007 wrote: users of their proprietary word list. Proprietary word list?
/ravi
|
|
|
|
|
You just infringed it thrice.
|
|
|
|
|
It seems you just infringed it five times.
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
|
|
|
|
|
|
"Someone" tried to patent the double click.
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
|
|
|
|
|
Had heard an anecdote related to the famous lexicographer Samuel Johnson. Once he met a novelist and said that all the words in that novel are taken from his book, because Johnson had indeed compiled a dictionary, a lexicon.
Now all the words in the word list of NYT will indeed be taken from Samuel Johnson's lexicon, compiled more than 200 years ago. Except for those words introduced into English since then. How can NYT stake claims for the word list?
|
|
|
|
|
I'll keep playing octokatherine's Word Master. Hopefully legally district enough to avoid lawyers.
|
|
|
|
|
Only Americans worry about lawyers
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Stocktaker who moves through fallen leaves (7)
"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!
|
|
|
|
|
Rustler ?
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
You are up tomorrow!
"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!
|
|
|
|
|
This was close, but I got it in 4:
🟨⬜⬜🟩🟨
🟨🟩🟩🟩⬜
🟩⬜🟨⬜⬜
🟩🟩🟩🟩🟩
⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜ After the second guess, I have four letters I know the position of ... so one to go. Trouble is, I can think of nine words that it could be, all with a different first letter ... Thankfully, I found a word that uses four of the possibles, and was lucky that one of them was in there (the Green in row three - the yellow was Green in row one).
That was nasty - it probably depends on the first word selection, but be careful with this one!
"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!
|
|
|
|
|
Wordle 270 5/6
⬜⬜⬜🟨🟨
⬜⬜🟨🟨🟨
🟨🟨🟨🟨⬜
🟨🟨🟩🟩⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
I got the last four letters in three guesses, but there were too many possibilities for the first. That's my run broken.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|