Skip to content

Commit e975034

Browse files
committed
Rename function-constructing macros
tl;dr: - `function` is now `lambda`. - `declarefunction` is now `function`. Rationale: These are more idiomatic, considering that "lambda" is the name for an anonymous function in a whole lot of languages, and "defun" or "function" is the name for a named one. Of course, JavaScript has the fun quirk that even function expressions ("anonymous" functions) can be given names. Either way, the distinction exists, so so must separate macros. Thanks to @IMPinball and @lhorie for suggestions and comments in chat.
1 parent f9420c1 commit e975034

File tree

2 files changed

+75
-75
lines changed

2 files changed

+75
-75
lines changed

src/built-in-macros.ls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ contents =
323323
throw Error "dot called with no arguments"
324324

325325

326-
\function : function-type \FunctionExpression
326+
\lambda : function-type \FunctionExpression
327327

328-
\declarefunction : function-type \FunctionDeclaration
328+
\function : function-type \FunctionDeclaration
329329

330330
\new : ({compile}, ...args) ->
331331
[ newTarget, ...newArgs ] = args

0 commit comments

Comments
 (0)