Skip to content

partial and comp verses anonymous functions (lambda) #397

Open
@practicalli-johnny

Description

@practicalli-johnny

partial vs lambas
lambdas are considered more idiomatic than partial and comp

reasons to prefer lambdas?

They are often shorter, and often produce nicer stacktraces

The behavior of comp and partial when used to create top level defs can be surprising when you redefine things

I believe rich has at least once said partial wouldn't be part of clojure.core if the function short hand syntax had existed first

I think nicer stacktraces is the "big reason" I was looking for. Thanks!

They are also easier to debug - if that’s your thing; I find cider’s debugger very useful

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions