(CNN) -- In the four decades that he's been making films, Woody Allen has become as synonymous with New York as bagels and Broadway.
Kindred comics: Larry David stars in "Whatever Works," Woody Allen's first New York film since 2004.
The prolific director has shot countless films in the city -- the opening scenes of the black-and-white shot "Manhattan" (1979) are a veritable love song to the Big Apple with a montage of timeless scenes of the city.
But above else, Allen's films capture the urban neuroticism of New York -- from the portrait of family dysfunction in "Hannah and Her Sisters" (1986) to the contrast between New York and Los Angeles sensibilities in his 1977 classic "Annie Hall."
His latest film, "Whatever Works," a comedy about a misanthrope set in Manhattan, is no different. The film, which Allen wrote and directed, couldn't be a more appropriate way to mark Allen's return to New York after filming four features in Europe.
In what would seem to be a match made in heaven, he directs fellow Brooklyn-born comedian Larry David in the lead role. Shooting on his home turf went without a hitch. "I think we enjoyed ourselves on the picture. It was a very pleasurable experience," Allen tells CNN.
David plays Boris Yellnikoff, a physicist who decides that life has no meaning and ditches his upper-class life for more bohemian digs on the Lower East Side, where he meets Melody, a young, innocent Southerner played by Evan Rachel Wood ("The Wrestler").
Add in Patricia Clarkson, who starred in Allen's last movie "Vicky Cristina Barcelona," and Ed Begley Jr. ("Pineapple Express") as Melody's parents, and the scene is set for a zany unfolding of events that is quintessential Allen.
David, who was a producer and writer on "Seinfeld," is a fitting choice for the role of Boris. The comic is maddening and cringe-worthy yet all the while hilarious in "Curb Your Enthusiasm" -- the long-running HBO series in which he plays a fictional version of himself.
Allen says he knew David, who played minor roles in two of his previous films, would be ideal. "[David] said, 'No, I can't act. I can't act.' But the truth is he acts beautifully," he tells CNN.
David managed scenes that the 73-year-old Allen says he himself wouldn't have been able to pull off. Allen says he could always do comedy, but David's scenes were skillfully touching. "Despite assuring me that he had no ability to do that, he did it just great."
For his part, David says he had no idea that Allen wanted to cast him in the role. "It was a very pleasant surprise when I got the call, but the prospect was quite daunting for me because I'd never done anything of this magnitude before -- so I tried to talk him out of it but I was unsuccessful."
After spending more than four years filming in Europe -- the last film he shot in New York was 2004's "Melinda and Melinda" -- Allen's homecoming has been eagerly anticipated. What's your favorite Woody Allen movie? What films do you think are emblematic of New York? Tell us in the SoundOff box below
After the acclaimed "Vicky Cristina Barcelona," which earned Penelope Cruz an Oscar for best supporting actress, Allen has shown a return to form, and the combination of David and a New York shoot would appear to have the makings for another triumph.
New York isn't the only familiar aspect of "Whatever Works," which touches on themes, such as the futility of existence and romance between an older man and younger woman, that recur in Allen's work.
But reviews of the film, which debuted at the Tribeca Film Festival, have been mixed. Screen International described it as Allen's best film in more than a decade, while Variety magazine said the film "feels forced, often losing itself in excess verbiage."
People will walk away with what they choose from the film, Allen tells CNN. But he had hoped to convey a certain "viewpoint towards life" in the film.
"But if I say that I'll scare the audience, so I'd just like to say that it's a funny picture and a picture with Larry David."
"Whatever Works" appears in limited release June 19.