13
donuts
6y

I was just chatting with my dad. He used to be mostly a C# dev but changed jobs and is now doing mostly Java. He says he likes it better.... Because it doesn't have lambdas/anonymous functions.

Uh.... Java was the first and only language where you can define interface implementations in-line (aka a whole bunch of functions)...

And 1.8 supports lambdas for Interfaces that have a single function...

I bet he'll hate JS... Where functions are can be passed around like objects, ES6 now supports lambdas and await, async... and anonymous functions (apparently they're called arrow functions?)

Comments
  • 0
    Well... Go tell your dad 8)
  • 0
    @telephantasm I did, that was my reply, minus the J's part cuz he has no exp beyond stuff that can be done in Notepad.
  • 1
    First and only language where you can inline...

    ... I am still chewing on that one...
  • 0
    @Yamakuzure chewing, what you mean? you can declare an anonymous class in the method.... Though I guess u can do it in JS as well...
  • 3
    A wise old monk once said a phrase that became a prayer:

    "Not all anonymous functions are arrow functions, but all arrow functions are anonymous functions"

    Amen
  • 1
    @billgates the term to chew was "first and only"

    Spoiler alert: Nope! Neither!
  • 2
    He's going to absolutely loathe Haskell/OCaml/F#/Scala/etc. then
  • 1
    () => {
    //code
    }

    is an example for an arrow function.
  • 1
    @PrivateGER in C# they're called lambdas and I think in most languages too. But when I was searching this for JS the top results were irrelevant. Then just searched for anonymous functions, where it said actually these are called arrows in JS.
Add Comment