by jstimpfle · 4y ago · 0 comments
well->people[2].are(likely, to, like, this, better);
compared to this ((Person->are ((array-at (Prefix->people well) 2)) ....
Please fix it for me, I can't be bothered.(Yes, this is an exaggerated example but this really is the point. Also, static types. If there's anything of overarching regularity in what you type, it better be syntax or it will be hard to check and take advantage of. This is what Algol-style languages do for systems programming.)
(peopler-simplifier well people 2 are likely to like this better)
This is where generally macros & helper functions in lisp actually produce a new "syntax", rather than leverage a large language provided one.This to me is actually the crisis for lisp. Any codebase requires you to learn all the various macros that do:
peopler-simplifier == $1->$2[$3].$4($5, $6 $7 $8 $9);What is being discussed in this sub-thread is an oft-cited criticism of Lisp's "power" being too much for its own good, but rarely (if ever) a reflection of idiomatic practice.
Too much power for its own good is one thing, but being just not optimized for the common thing is another. How would the following function, randomly picked from what I have open on github right now, look in "Common" Lisp? And if I ask 3 persons to do it, what is the likelyhood that they would pick more-or-less the same approach?
Edit_Array buffer_batch_array_from_linked_list(Arena *arena, Batch_Edit *batch, i32 count){
Edit_Array result = {};
result.count = count;
result.vals = push_array(arena, Edit, count);
i32 counter = 0;
for (Batch_Edit *node = batch;
counter < count && node != 0;
node = node->next){
result.vals[counter] = node->edit;
counter += 1;
}
return(result);
}After a while I realized it - I may have programmed in Common Lisp but never professionally... on a professional code base. Only ever on open source thingies, and small side projects. Paid or unpaid.
I've never seen industrial common lisp code. My last job had some but I never got to work on that project, and no longer can see it :(
Is there an example somewhere of this? C++ examples would be things like Chrome, C would be lots of open source OS's and kernel drivers. Is there something equivalent for CL?