I've modified "sweeten" per your suggestion
Posted Dec 5, 2012 2:01 UTC (Wed) by
david.a.wheeler (guest, #72896)
In reply to:
Sweeten results by HelloWorld
Parent article:
GNU Guile 2.0.7 released
HelloWorld said:
... The problem with the
defun foo bar(baz)
...
syntax is that the first argument is outside of the parenthesis, while the following arguments are within, suggesting that the first argument is somehow different even though it really isn't.
... There's also another way to write it:
defun foo (bar baz)
...
My main point here is that the heuristic should special-case some forms. defun is one, another obvious one is lambda for the same reason.
The "sweeten" tool actually already special-cases some forms, but since I use it more for Scheme than Common Lisp, its special-case form for "defun" wasn't all that great. Thanks for the feedback, that's a good point.
I've modified "sweeten" in the development branch, it now handles "defun" specially and will output the format you suggested above. This change will get rolled into the next "official" release, but feel free to try it out now.
Enjoy!
(
Log in to post comments)