|
you've been replying to mine the entire time
welcome to my AliceBot, codeproject edition.
just kidding
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Err368
alicebot implied
discontinue
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I'd use typedef if C# had one as powerful as C++'s. Using just doesn't cut it.
in the meantime it's VAR ALL DAY LONG.
Haters gonna hate.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Even VS 2019 asks to create a strongly type variable rather than a var in a lot of cases. So yes, take your VAR and shove... (SMACK)
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
i will take hostages if i must in order to avoid typing long as days generic and tuple declarations.
you have my list of demands. it is simply. I require typedef.
otherwise, VAR VAR VAR!!! =D
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
and the minute i take coding advice from Microsoft's Clippy, just go ahead and shoot me in the face. With a .45. I don't deserve an open casket.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Ah Clippy, despised even more than VB. I consider siri, cortana and all their ilk the bastard children of Clippy.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
visual studio's nagging reminds me of it.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Mycroft Holmes wrote: I consider siri, cortana and all their ilk the bastard children of Clippy That's an eloquent way to put it, and I cannot explain why that made me think of the "Chucky" movies
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
Var is for programmers with a lack of a sense of commitment.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 29-Jul-19 5:17am.
|
|
|
|
|
for(var guilty=now;guilty<endOfDays;++guilty) ;
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
|
what's wrong / not good enough with (at the top of the file):
using IntList = System.Collections.Generic.List<int>;
|
|
|
|
|
For simple things it may work, and I use that.
But now try to make a Dictionary of those the same way.
|
|
|
|
|
Mm...
do you mean while this work...
using IntList = System.Collections.Generic.List<int>;
using DictIntList = System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<int>>;
this short cut is sadly incorrect
using IntList = System.Collections.Generic.List<int>;
using DictIntList = System.Collections.Generic.Dictionary<string, IntList>;
However either way you can still write:
var d = new DictIntList();
var l1 = new IntList();
d["doo"] = l1;
|
|
|
|
|
Super Lloyd wrote: d["doo"] = l1; I give in, and I know it's going to annoy me all day.
What song's it from?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
I always had this idea one day to start to add some F# utility library to my home utility libraries....
But this project has still gone nowhere in a long time :/
|
|
|
|
|
Super Lloyd wrote: this short cut is sadly incorrect
Annoyingly, it works if you put the using statements in different scopes:
using IntList = System.Collections.Generic.List<int>;
namespace TestIt
{
using DictIntList = System.Collections.Generic.Dictionary<string, IntList>;
...
Type Alias | C# Online Compiler | .NET Fiddle[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
hahah good find!
|
|
|
|
|
doesn't work in the real world.
Most of the time I need more than static typedefing. I will need to fill in a T parameter somewhere.
If using let you do like - using Fat<t> = IDictionary<t,fa<t>>; then i would use var less.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
|
i have to agree. for me i think it makes code clearer than the alternative in a lot of cases where generics are involved. The screen gets to cluttered with angle brackets otherwise. i hate it.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Super Lloyd wrote: what's wrong / not good enough with (at the top of the file): ... Nothing, but it may impose a task on some code-readers/user to consult your pre-index if you stray from the path of mnemonic.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
well... the OP was asking for typedef. it is what it is!
Personally I like var well enough!
|
|
|
|