Skip to content

Discuss macro ideas on IRC or the LFE list #1

@yurrriq

Description

@yurrriq

As a user, I want to be able to write (defprop some-name ...) and enable EUnit to call it as prop_some_name/0 and myself to call it as prop-some-name/0 or prop_some_name/0.

Essentially, I want the kebab-cased version to expand to the snake-cased version at compile time.

I'm not sure of the best approach, and the following didn't work:

(defmacro defprop arg
  ...
  `(progn
    (defun ...)
    (defmacro ...)))

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