Pirkei Avot — the Ethics of the Fathers — instructs us that it is as essential to form relationships with friends (kenei lecha chaver) as it is to find a rabbinic guide (asei lecha rav).

In Ta’anit, the Talmud goes a step beyond, and teaches that we have a choice of “either friendship or death,” and Elie Wiesel said “friendship marks a life even more deeply than love.”

Friendship, of course, is a universal value, with, for example, Thomas Aquinas writing that “there is nothing on this earth to be prized more than true friendship.” To me, friends are people who like, care about, are considerate of, and interested in each other; who enjoy talking, arguing, laughing, and spending time together; who have common interests and values; who are trustworthy and dependable; who do not only listen but also pay attention; who cheer your victories and give support and encouragement in times of need; who help each other grow to be their best selves.

Yet experience teaches us that the nature of friendship and the means of forming friendships differ under varying circumstances and life stages. Young children new to the neighborhood seem to make friends within minutes of arriving at the playground, while their parents struggle to find a place. That’s not because people are cold and unfriendly, but with their obligations to children, career, and other demands of modern life, they don’t have enough time to spend with the friends they already have, much less make new ones. That’s a dilemma of which I have been on both sides.

And so new residents often make friends with the parents of their children’s friends, with whom they carpool and arrange play dates. Or they become friends with other new residents, who also are looking for, and having difficulty making, new friends. Some of these friendships of convenience develop into meaningful ones and endure, while others wither on the vine as time passes, children graduate, and new residents become old-timers.

Then there are shul friendships. Since I know I’m not supposed to talk during services, the last two times my shul built a new sanctuary I purposely chose a seat in a section where I had no friends, thinking I would have no one to talk to. And it actually worked — for about a year or two. Then I learned, to my detriment/pleasure, that you become friends with the people you sit next to every Shabbat and yom tov. And so, at a stage in my life when I am usually invited to bar mitzvahs only of relatives and the grandchildren of friends, I found myself attending a bar mitzvah of a child of a shul friend.

I also have learned that friends from school whom you have not seen in decades fit into two categories. There are those who, after a warm greeting, you begin chatting with — and the next thing you know two hours have passed. The years have washed away, and you’re back in school or camp or the old neighborhood. You may not see them again for years, but you understand that in important ways you’re friends for life. There are others, though, who, after a warm greeting, you begin chatting with — and the next thing you know it’s been only two minutes and neither of you has anything left to say. It’s at that point that you wonder how you were ever friends in the first place, and chalk it up to youth.

In the 21st century there are, of course, virtual friends you know only from an online profile, whose spouse and kids you never met, whom you wouldn’t recognize in a crowd, whose voice you never heard, and whose heart never touched yours. But every once in a while you find one who not only shares your political and religious views, but also, like you, misses Phil Ochs, the ‘60s troubadour who’s been gone for half a century, and still listens to his songs. And when he posts a picture of Central Park on his Facebook timeline, you realize he’s visiting New York, and the next day the virtual becomes real as you share a lunch in midtown.

And there are serendipitous friendships that arise at an age when you think you’ve made all the friends you ever will. It turns out that you and the editor of the paper that publishes your column have a slew of overlapping relationships with friends and relatives, and, as you dig a bit deeper, strong overlapping sensibilities on areas of life that are important to you both. You even have similar senses of humor. And when you inveigle an invitation for a chat over coffee from the educator whose scholarship and ideas you deeply respect, you learn that your brother is a favorite scholar of his, your daughters were in school together and are good friends, and you disagree about many areas of life that are important to you both — yet in ways so civil and thoughtful that the disagreements are enjoyable and meaningful.

But the most cherished friendships are those that begin in childhood and continue unabated to the present. The sweetness of such relationships sometimes hits you when it turns a tad bittersweet, and your long-time friends decide to downsize and move to a new neighborhood to be closer to their grandkids. Or, like this Pesach, when one of our guests was a friend a bit shy of seven decades duration, whose bar mitzvah parsha, and precisely how he layned it, are forever engraved in my memory. I know not only his kids and grandkids, but I knew his parents and grandparents as well, and he could say the same about mine. Five generations.

We share memories of people and events; easy laughter often accompanies our conversations; we don’t need to explain references or cultural allusions; we frequently care about similar issues. And yes, on rare occasions we even briefly may not like each other. But we quickly see beyond the flaws, and realize how little they really mean.

With these friends, we know each other for who we were, who we are, and how we’ve gotten from then to now, from there to here. As that Talmud in Ta’anit suggests, in choosing such lifelong friendships we have fulfilled the Torah dictum of uvacharta bachayim.

We have chosen life.