|
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!
|
|
|
|
|
|
who needs type checking? =)
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.
|
|
|
|
|
Type checking is at compile-time as usual.
|
|
|
|
|
i understand how var works, I just wasn't paying attention and wording my response very carefully.
what i meant to say is who needs explicitly named types in var decls?
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.
|
|
|
|
|
Ummm, I don't think the using clause statement is actually meant for typedef duties.
var is almost as evil as goto .
".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
|
|
|
|
|
i know, but it's the closest thing i have.
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.
|
|
|
|
|
If you{re functioning at a high level, does that mean you{re writing code in Haskell?
CQ de W5ALT
Walt Fair, Jr.PhD P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
No, you just live in a high-rise apartment.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Doesn't that mean coding stoned?
"Go forth into the source" - Neal Morse
|
|
|
|
|
"how do i do error recovery in a lalr(1) parser"
i thought this was a much easier question
i thought this was one function called "Panic()"
now it looks like i need to rewrite my LALR stuff.
*googles frantically*
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.
|
|
|
|
|
Sleep is necessary for one's mental health. Get some.
|
|
|
|
|
i'm awake. i woke up just before 4. not unusual for me
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.
|
|
|
|
|
codewitch honey crisis wrote:
i'm awake. i woke up just before 4. not unusual for me
Me.too. I always try to wake up before supper at 5 PM.
CQ de W5ALT
Walt Fair, Jr.PhD P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
OK, I thought you've been at it the whole night.
|
|
|
|
|
I haven't figured out the google-foo needed to get my PhD Thesis back, but you can easily find it in Google-Scholar.
CQ de W5ALT
Walt Fair, Jr.PhD P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Quote: When you search "how do I ..." and you get an actual PhD thesis back You're probably a chiropodist.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I just revived an old parser project and got it retooled using my new codebase.
LALR(1) parsing here we go.
Test harness, check.
Code generation in 3.. 2.. 1..
Pass me the damn coffee, I got this.
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.
|
|
|
|