Vinen
God is dead
- 2,791
- 497
Overall thats a pretty terrible interview question. While I know what they are I've never seen them actually used in a code-base.Those are like lambda functions, but classes instead?
Yes, they are more or less the same thing.Those are like lambda functions, but classes instead?
Well, if he's from the C# world he was probably thinking WTF is that.The other guy interviewing him just have thought even less of him than I did because he asked him what an anonymous inner class is and his response was pretty pitiful there as well.
Lambda Expressions (C# Programming Guide)Well, if he's from the C# world he was probably thinking WTF is that.
But that's interesting. No such thing exists in C#.
Lamba expressions create anonymousmethodsbut not classes. There's no way to attach properties or fields.Lambda Expressions (C# Programming Guide)
Same concept. Different name and syntax
Added in .NET 3.5 (I think?)
Lambdas have basically deprecated the need for AIC in Java but the Spark we write here is written on Java 7 so all your function implementations are done anonymously. Probably the best response I'd be satisfied with would be something like "They are in-line definitions of interface or abstract methods." If you've done anything with Java's shit-tier UI Swing they use AIC all over the place too.Those are like lambda functions, but classes instead?
Ahh, yeah see that now.Lamba expressions create anonymousmethodsbut not classes. There's no way to attach properties or fields.
Whats the 1% use-case since I'm too lazy to google.You rarely actually define the class full-on anonymously in a class. 99% of the use cases I've ever come across are just defining the method behavior.
It would probably be some thingWhats the 1% use-case since I'm too lazy to google.
This is about the only phrase in this thread that I DO understand (besides the shitting one's pants reference - perhaps you can get a bonus of Zorflex undies out of your boss?).I don't understand
That's actually pretty cool. I would've had a use for that just recently.It would probably be some thing
Need is a relative term.You were learning Computer Science the year I was born. Just felt like that needed saying.