C# 4.0. w00t.
-
-
Optional parameters would be damn handy.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Chris Maunder wrote:
Nice idea, but I can just picture the code that is going to come from developers who don't understand when and where to use them. And not use them.
Please try explaining that logic to the manufacturers and distributors of firearms. I'd love to live in a world where things like this[^] are unheard of.
:josh: Try Crack![^] Sleep is overrated.
I'd also love to live in a world where are current laws are enforced. Ex-convicts aren't allowed to own firearms, let alone a fully-automatic? If current laws were enforced, this guy would have been in jail for violating two current laws. I guess laws don't stop criminals from selling fully-automatic weapons on the black market to ex-cons.
-
I actually don't program in VB because I think it produces code that's harder to read. This makes it more difficult to understand and thus more difficult to maintain. This is especially true for projects of any complexity or size. I thought with C# that MS had finally learned an important lesson from Java: They need a clean language with a simple, clear syntax and straightforward semantics. It seems like their resolve has begun to waver. They've finally given in to the temptation to turn their most beautiful language to date into something more like it's "easy" sister. I am saddened by this turn of events.
-
Patrick Etc. wrote:
Every gun in the world could be destroyed and you'd still get random stabbings, baseball battings, getting run over by cars... the very nature of freedom is one of risk.
True. So, with that logic, why not sell nuclear bombs at K-Mart? :)
:josh: Try Crack![^] Sleep is overrated.
Josh Smith wrote:
True. So, with that logic, why not sell nuclear bombs at K-Mart?
Hehe you got univoted :) And as for the logic, that was quite a leap there... just because risk is inherent doesn't mean we don't work to mitigate it ;) but that requires the wisdom to know when a risk-mitigation strategy throws the baby out with the bathwater. And that's about all I'm going to say else we dive into SB material.. :D
-
Actually, optional parameters are a feature of C++. I've already stated this before, but the only bad thing optional parameters does is creates an additional thought process when coding because you are faced with choosing between function overloading or the use of optional parameters. There are times would an optional parameter would have been preferable to overloading.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Actually, optional parameters are a feature of C++. I've already stated this before, but the only bad thing optional parameters does is creates an additional thought process when coding because you are faced with choosing between function overloading or the use of optional parameters. There are times would an optional parameter would have been preferable to overloading.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001John Simmons / outlaw programmer wrote:
Actually, optional parameters are a feature of C++.
True, but it's been a while since I've seen people use default values.
John Simmons / outlaw programmer wrote:
There are times would an optional parameter would have been preferable to overloading.
What's your example?
-
I was going to post tomorrow's survey as "Does the thought of Dynamic variables make you break out in a cold sweat?" Nice idea, but I can just picture the code that is going to come from developers who don't understand when and where to use them. And not use them.
cheers, Chris Maunder
CodeProject.com : C++ MVP
Chris Maunder wrote:
I was going to post tomorrow's survey as "Does the thought of Dynamic variables make you break out in a cold sweat?" Nice idea, but I can just picture the code that is going to come from developers who don't understand when and where to use them. And not use them.
Yes, but....what makes that any different from gotos, K & R C function parameters, MAPCARrion in LISP (the rotted remains of programmers trying to understand poorly implemented algorithms using MAPCAR()), etc.? It's just another new potential nightmare...maybe I'm jaded, I dunno :laugh:
-
Patrick Etc. wrote:
Every gun in the world could be destroyed and you'd still get random stabbings, baseball battings, getting run over by cars... the very nature of freedom is one of risk.
True. So, with that logic, why not sell nuclear bombs at K-Mart? :)
:josh: Try Crack![^] Sleep is overrated.
Josh Smith wrote:
Patrick Etc. wrote: Every gun in the world could be destroyed and you'd still get random stabbings, baseball battings, getting run over by cars... the very nature of freedom is one of risk. True. So, with that logic, why not sell nuclear bombs at K-Mart?
I keep asking, for them, howitzers, claymores mines, and acid pellets for shotgun loads, but they just laugh like I'm not serious *bitterly holding onto his gun and Bible in Pennsylvania, and voting for Obama :laugh: *
-
Chris Maunder wrote:
My life is complete.
Not until you've tried women; then you're done.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
Roger Wright wrote:
Chris Maunder wrote: My life is complete. Not until you've tried women; then you're done.
I've tried women, they continue to try me :O
-
Chris Maunder wrote:
Named and Optional Parameters.
VB has had those since... oh... the dinosaurs. So C# 4.0 is really VB in disguise? ;P
ChandraRam wrote:
So C# 4.0 is really VB in disguise? ;P
C# 1.0 was VB in disguise...they had to complete the full implementation sometime :laugh:
-
Josh Smith wrote:
I'd love to live in a world where things like this[^] are unheard of.
Mmm, you'll be waiting an awfully long time. Every gun in the world could be destroyed and you'd still get random stabbings, baseball battings, getting run over by cars... the very nature of freedom is one of risk. That's the nature of reality as we currently inhabit it. Now, if we could invent an alternate reality where freedom and absolutely perfectly responsible behavior went hand in hand... but I digress.
Your counter sounds logical, but it isn't. I doubt very much that even the most paranoid idiot would have answered the door to trick-or-treaters and knifed them, battered them to death with a baseball bat, or run them over with his car -- no matter how much illegally gained money he was "defending". Anyone who truly believes it necessary to keep a loaded AK47 in his home should be locked away in an insane asylum before he ever gets the chance to fire it.
-
Your counter sounds logical, but it isn't. I doubt very much that even the most paranoid idiot would have answered the door to trick-or-treaters and knifed them, battered them to death with a baseball bat, or run them over with his car -- no matter how much illegally gained money he was "defending". Anyone who truly believes it necessary to keep a loaded AK47 in his home should be locked away in an insane asylum before he ever gets the chance to fire it.
Did you actually read that article that Josh linked to, or did you just skim the part where he shot the 12 year old? The guy very much was a paranoid idiot, and he likely would have knifed or battered trick-or-treaters to death with a baseball bat. The AK47 was incidental - he probably would have made due with whatever weapon came to hand if he didn't have a gun in the house.
Imagine that you are hired to build a bridge over a river which gets slightly wider every day; sometimes it shrinks but nobody can predict when. Your client provides no concrete or steel, only timber and cut stone (but they won't tell you what kind). The coefficient of gravity changes randomly from hour to hour, as does the viscosity of air. Your only tools are a hacksaw, a chainsaw, a rubber mallet, and a length of rope. Welcome to my world. -Me explaining my job to an engineer
-
VS for C/C++ programmers (not necessarily MFC) has sucked since the end of VS 6. You want help with that function? No, you have too many template classes. It is nice that they continue to make their tabs rounder, and their gradients smoother. I've always said, "you know what VS could use? More gradients!"
Actually, VS2005 was MS's first usable IDE, before VS2005 I could only use Borland's IDEs and freewares (which used to be better than VS), like Bloodshed Dev C++. For instant, try using the help in VS6 or VS2003 to look something up - worst help ever.
-
Did you actually read that article that Josh linked to, or did you just skim the part where he shot the 12 year old? The guy very much was a paranoid idiot, and he likely would have knifed or battered trick-or-treaters to death with a baseball bat. The AK47 was incidental - he probably would have made due with whatever weapon came to hand if he didn't have a gun in the house.
Imagine that you are hired to build a bridge over a river which gets slightly wider every day; sometimes it shrinks but nobody can predict when. Your client provides no concrete or steel, only timber and cut stone (but they won't tell you what kind). The coefficient of gravity changes randomly from hour to hour, as does the viscosity of air. Your only tools are a hacksaw, a chainsaw, a rubber mallet, and a length of rope. Welcome to my world. -Me explaining my job to an engineer
Sure I read it. He shot through a closed door from where he couldn't see that they were kids, and not rival drug salesmen or suppliers he'd stiffed. Do you honestly think that he would have believed he was being robbed by children with buckets of sweeties (US: candies), if he'd been able to see them? Or is it that you're defending the supposition because want to keep a loaded AK47 in your home? It's "make do", by the way, not "due".
-
Sure I read it. He shot through a closed door from where he couldn't see that they were kids, and not rival drug salesmen or suppliers he'd stiffed. Do you honestly think that he would have believed he was being robbed by children with buckets of sweeties (US: candies), if he'd been able to see them? Or is it that you're defending the supposition because want to keep a loaded AK47 in your home? It's "make do", by the way, not "due".
I am defending the supposition because crazy people are crazy, regardless of whether they have guns or play violent video games or are into bondage porn. I don't think crazy people should have loaded AK47s in their house. But by the same token, I don't think people should be denied ownership of certain items just because loonies use them to kill people. I'm all for keeping weapons out of the hands of the insane, the foolish, and the dangerous, just as I am ok with cops arresting drunks, people blitzed out of their heads with drugs, or just plain sleepy people out for a drive in their car. That doesn't mean I support banning cars from the road wholesale. And you're right, I did use the wrong "do". Serves me right for sleeping in this morning instead of getting up an hour early, what with the time change and all. PS. This is getting into Soapbox territory so no more replies from me on this subject. (For the record, I don't usually wander into the Soapbox, so I guess that means I'm done.)
Imagine that you are hired to build a bridge over a river which gets slightly wider every day; sometimes it shrinks but nobody can predict when. Your client provides no concrete or steel, only timber and cut stone (but they won't tell you what kind). The coefficient of gravity changes randomly from hour to hour, as does the viscosity of air. Your only tools are a hacksaw, a chainsaw, a rubber mallet, and a length of rope. Welcome to my world. -Me explaining my job to an engineer
-
But, but, you had those in C++ and VB(A). How many times can you complete your life (if you're not a cat)? :)
- S 50 cups of coffee and you know it's on! A post a day, keeps the white coats away!
"But, but, you had those in C++ and VB(A). How many times can you complete your life (if you're not a cat)?" When did C++ have named parameters?