|
Nah, just feeding-time. There's one tuna at the bottom of the meowtain.
Happy I don't have to clean that kitty-litter.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
foo("bar");
does this refer to an invocation of the method foo? or an invocation of the delegate instance referred to by the variable or argument foo?
*headdesk*
C# is massively ambiguous without having type information, so now I get to write a visitor to "patch up" the code dom with type information. So basically i always create these expressions as delegate invocations, but then i have to go back through later and find types, so I can change the right ones to method invocations instead.
I know C family languages require type information to parse (which is unfortunate) but C# takes it to another level. In for a penny, in for a pound I guess.
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 codewitch wrote: does this refer to an invocation of the method foo? or an invocation of the delegate instance referred to by the variable or argument foo?
Neither: it means a VB programmer wants to access an array element and forgot where he was.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
lol, i'm glad my c# compiler doesn't see it that way. =)
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 don't see it that way and I am a VB.NET programmer but also fluent in C#.
It is amazing how many people really view C# as some completely different type of animal than that of VB.NET...
To me, the line of code was calling the method, "foo", with a string parameter...
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
He is referring to old classic VB, which of course any public function in Module can be called from anywhere.
{}*
|
|
|
|
|
honey the codewitch wrote: does this refer to an invocation of the method foo? or an invocation of the delegate instance referred to by the variable or argument foo?
Yes.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
you get an A
and i get a headache
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.
|
|
|
|
|
|
# define foo(x) this.GoToThe(x)
|
|
|
|
|
|
Nor does
#define if while
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
#define then {
#define endif }
lets make C really basic so anyone can do it
Edit: more complete
#define IF if (
#define THEN ) {
#define ELSE } else {
#define ENDIF }
this internet has become nothing but fake news.
... time to fix it, time to get back to the fax!
modified 29-Nov-19 12:58pm.
|
|
|
|
|
I've killed for 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.
|
|
|
|
|
Chanting:
ELSEIF ELSEIF ...
|
|
|
|
|
The C pre-processor works just fine with C# code.
|
|
|
|
|
PIEBALDconsult wrote: The C pre-processor works just fine with C# code. That's very interesting; please say more.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
I wonder if the fact that the notion of successfully creating useful output isn't mentioned, is relevant?
I'm sure it would be perfectly happy to tell you whereabouts the input file contained text that wasn't C compliant. In that case, I'd say that it did in fact work just fine with what you gave it. That you gave it C# when it has a dietary restriction that only allows it to consume C is irrelevant. The pre-processor still ran and exited without an error code, a crash or undefined behaviour.
Reasonable people call them Semantics, others think that Symantec's is about tiny differences in language, rather than a word that implies ownership by the Symantec company..
Going to be interesting to see what the answer is on this one.
|
|
|
|
|
"Everything is exactly as useful as you make it." - Hacker lore
"Everything is exactly as real as it is useful." - Honey the Monster.
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.
|
|
|
|
|
|
Thanks, for your educational response ! The article, and comments/discussion, was interesting; imho, the technique you show is too esoteric for someone who is not C/C++ highly literate, like me.
I am reminded, by your article, of using a factory class to spit out different flavors of stuff depending on input parameters/types.
cheers, Bill
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
honey the codewitch wrote: does this refer to an invocation of the method foo? or an invocation of the delegate instance referred to by the variable or argument foo? It's the latter which I know because of casing.
If it were the former surely it would be Foo("bar");
Oh, but I forgot, style isn't important and we can forget about consistency.
We write for compilers and they can read it just fine
|
|
|
|
|
do you REALLY want me to enforce title casing for methods vs fields? because I can do that, and it makes my job a HELL of a lot easier.
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 was thinking of this conversation of a while back: The Lounge[^]
Unfortunately, not everyone agreed with me and so they were wrong
I won't mention names (although it's quite easy to look up), but someone literally said "Style is not important because you're writing code for compiler to read, not for developers."
And here you are wondering what the hell you're looking at while I would be absolutely sure (in my own code) because I CARE ABOUT STYLE!
I wouldn't mind enforcing PascalCase for methods and camelCase for fields and variables
|
|
|
|
|
I agree with SuperLloyd in that discussion. Context is everything.
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.
|
|
|
|