News for hackers. Stuff that matters.
Re:Portacle – A Portable Common Lisp Development Environment by tempodox on Wednesday January 04, 2017 @09:51AM (#13318663)
As someone who uses both Common Lisp and OCaml, the thing I miss the most from the latter is a compile-time code generation facility, of which Lisp macros are a prime, and yet unrivalled example (only Julia's macros come suspiciously close).

It's funny that you should mention currying. When I started programming, I didn't know of ML (and wouldn't have access anyway) and the decidedly un-mathematical approach taken by practically all other languages irritated the hell out of me. I found “error: too few arguments” always an illogical answer. A literal implementation of Alonzo's great discovery has a clear advantage here. When every multi-argument function is actually multiple nested lambdas of 1 arg each, the opposite direction isn't hard to construct any more.

So, if you're already comfortable in the ML world, I'd say you're not missing anything vital.

Re:Portacle – A Portable Common Lisp Development Environment by nnq on Wednesday January 04, 2017 @10:27AM (#13318998)
> too few arguments” always an illogical answer

If you write math/algo code, yes. Most other types of code benefit a lot from:

- variable numbers of arguments

- default argument values (to practically make use of the one above)

- named/keyword arguments (usually combined with default arg values in same use, which will make obvious the need for specifying arguments in variable orders)

And of course that if you have these, you really don't want to also have auto-currying because it would make implementation hard and code reading or debugging a nightmare! (especially in a dynamic language)

...which may seem like an abomination for both the "clean code / uncle Bob's disciples" side which prefers methods of less that 3 arguments (but apparently they don't mind having a zillion of them spread in a zillion little classes), and for the "strict and auto-curried functional programming" side.

But for real world code written under real deadlines, usually without the time to RTFM of every lib and api you use, makes life 100x easier for regular programmers which aren't always fast enough to get the right abstraction in the allocated time or have good enough memory to figure out the right order and number of arguments a function takes in all cases!

(imho both Clojure and CL seem to have gotten these things right...)

Re:Portacle – A Portable Common Lisp Development Environment by tempodox on Wednesday January 04, 2017 @02:09PM (#13321111)
I hear you and I don't disagree. As far as discoverable / self-explanatory API goes, named arguments are a great help. OCaml gives you those, and optional named args with default values. Which, together with strict & strong typing (plus other FP perks), makes the best of both worlds for me.
Re:Portacle – A Portable Common Lisp Development Environment by nnq on Thursday January 05, 2017 @07:39AM (#13326630)
> OCaml gives you those

I know. And I learned it up to a point... But for me it unfortunately falls into that uncanny valley between truly elegant languages (Haskell, Scheme) and truly practical languages (Python, Ruby, Go). Neither elegant enough nor practical enough for my use. Probably better for other people's uses.