4 ms·
That's really interesting. I can't say that I, personally, find it easier to read than the rather plain polish notation of the first example. I find I have to w
by stormbrew 13y ago
That's really interesting. I can't say that I, personally, find it easier to read than the rather plain polish notation of the first example. I find I have to work really hard to connect the _s together and I find this process unpleasant. Maybe it's just an artefact of not finding bare lisp in general all that appealing.
Re your example with <, the 'natural' object oriented way to do this to me would be to treat the list itself as the subject. [a,b,c,d].isOrdered() say. To the fact that doing it this way in java would be incredibly ugly, I'll only say that I'm not even remotely a fan of java or, for that matter, C++/Java/C#-style static-typed object-orientation.
- JackMorgan 13y agoThe threading macro idea is meant to just make it easier for humans to read, so if it's not easier for you, no sense bothering with it. In such, it's not a true prefix vs infix tool, just a tool possible in languages with macros. As to the are increasing, yes, I suppose the list itself would be a more natural subject. This is why I love macros, not really infix or prefix specifically, because a macro makes it trivial to just have this: (. [1 2 3 4].isOrdered) turn into this: (isOrdered [1 2 3 4]) That way both the human and the compiler get their preferred view.