|
|
You see many Women are against this new legislation. I think they want to get rid of the hubby-stuff pretty quick as well. They seem to be okay with the "Shariya"'s law. It's a mutual benefit.
Not sure why the govt wants to spoil their game.
|
|
|
|
|
i never have.
give me templates.
or you may as well just give me something procedural.
if i can't do generic programming i'm a sad honey bear.
C# is barely adequate. And it's too object centric IMO.
generics need to be able to do more. I want traits. I want the runtimes to do what i can make a C++ compiler do with templates.
I probably just got the BAC up of this entire board saying that, but there it is.
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.
|
|
|
|
|
Neither taste good, and C# doesn't have any of them.
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!
|
|
|
|
|
that's a fair point.
spider eggs especially.
*shudder*
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.
|
|
|
|
|
It's not really our fault that you picked the wrong tool for the job at hand...
If you wanna go native, do it. You can still write un-managed DLLs that can be used in .Net apps.
I don't understand what the fuss is about.
".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 like managed code. i just wish generics did more than they currently do. At least they added covariance with .NET 4 but it has a long way to go.
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.
|
|
|
|
|
honey the monster, codewitch wrote: i just wish generics did more than they currently do
Um, Generics can do a lot in C# currently. How exactly are generics NOT working for you in C#?
|
|
|
|
|
one example I'm running into right now is template specialization.
I have a finite state machine engine and it works for any transition input type and any accept symbol type.
However, there are additional features that can happen - significant ones that can only exist when the transition type is char - this specialization is effectively a regular expression engine, which means it can parse from a regular expression, and provide regex matching over string inputs. The other kind of FAs it wouldn't even make sense for that.
So because of this I have two separate classes - one generic FA<tinput> class, and one called CharFA where the TInput=char basically.
It means more code to maintain because a lot of it is duplicated. To unduplicate a lot of which i could, I'd have to add another codefile with an interface, and another with static methods to share common functionality, which again, increases the code size.
So it's not even that I can't do it with C#, it's that what is elegantly handled in C++ is clunky in C# to do the same thing, and requires more code.
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.
|
|
|
|
|
Create an interface class called IFa (name it something esle for sure, but this is for ilustration purposes) and implement IFa in a new class CharFA using that interface. or Create an iterface called IFa and a default implementation for IFa and then create another class that implements the default implementation and then just override any methods, etc.
It is object oriented programming, which you hate, but that is how this stuff is usually done, more or less, in C#.
Would that work for you?
Just a suggestion, I am not really trying to solve any problems here. I think your dislike of C# and generics, and object oriented programming may prevent you from seeing how things are done in this language, etc.
Good luck.
|
|
|
|
|
which is what i mentioned in my other reply, after an edit though. it's not that I can't do it. It's that it's clunky and requires more code than the elegant specialization feature in C++
it reminds me of the limitation of lack of multiple inheritance - you can sort of emulate it, but it requires more code.
like i said, i just wish generics could do more.
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 think the "clunky" is relative here, as I don't think it is clunky because I have limited exposure to other techniques.
|
|
|
|
|
that's definitely fair. and I come at C# from a C++ background.
I like C#, don't get me wrong, and it's miles ahead of Java in terms of how it's put together, IMO, but I still miss aspects of C++ development with it, even as it has supplanted C++ as my primary development language and environment.
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 miss the multiple inheritance of C++ as well. I know we can do it via Interfaces but it's not quite as straightforward. Perhaps by C#12 it will be there.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
i'm glad i'm not the only one! =)
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.
|
|
|
|
|
There are two ways that I can think of to avoid this code duplication. (Whether these are suitable is up to you.)
1. Implement your byte specific class as a subclass of your generic class?
2. Use dependency injection for the byte specific code.
Good luck
|
|
|
|
|
the latter isn't practical.
the former i already did, and it's sloppy as hell
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.
|
|
|
|
|
Take a look at F# or another functional language. State machines and functional languages are made for each other.
|
|
|
|
|
I've strongly considered it. I might eventually move, but I'm familiar with C#.
Maybe if they had Haskell I would have moved already.
Edit: Adding, one of the drawbacks of functional programming is lack of state, and some of these equations are so complicated that state is necessary for optimization and I wonder how a functional language will handle such a thing. Recomputing or doing lazy iteration over these algorithms is grossly impractical even if it's "correct"
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.
|
|
|
|
|
Memoization might be useful for you. It's basically a way to cache function results with a given input in a dictionary and return the cached value instead of running the calculation again.
|
|
|
|
|
yeah. in fact, I need to explore memoization more anyway for implementing a PEG parser.
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.
|
|
|
|
|
|
There there.
I agree that a multi-paradigm language is a better idea than one which insists on objects.
One needs to use the right tool for the right job and OOP is not the right tool for a great many jobs.
|
|
|
|
|
it's one of the areas where C++ really shines and I kind of wish other, higher level imperative languages would catch up.
though i'd also like to see C++ have more functional-programming constructs in the future.
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 only ever dabbled in C++ (80s, 90s), so I never became familiar with what it can do.
I went straight from C (mostly on OpenVMS) to C# (and .net) and it was like a Bob-send -- I'm glad I hadn't had to use C++ and the various libraries people talk about. A lot of the hype I heard turned me off of C++ anyway.
But... I want multiple-inheritance and such. There are a number of facets of C# (.net languages) I don't like.
Languages and frameworks should provide features and _allow_ developers to do what their particular task requires rather than dictating what the develop must or must not do.
I may still need to look at D again.
|
|
|
|