4 ms·
Always fun to see people rediscover Greenspun's 10th rule... Hmm specifying my UI in code is tedious, and porting it to a different framework is impossible! I
by codemonkey-zeta 5y ago
Always fun to see people rediscover Greenspun's 10th rule...
Hmm specifying my UI in code is tedious, and porting it to a different framework is impossible! I wonder if I could encode this somehow...
Eureka! I can just specify my code as a data structure! Now it's implementation agnostic!
How can I actually use it though?
I know! All I have to do is write some functions which recursively descend through the UI data structure and make the corresponding calls to the UI framework!
[Writes an interpreter(s) for their data structure]
Congratulations, now you understand the value prop of lisp, and have a poor supplement in C++.
- jcelerier 5y agooh, but I'd definitely use lisp ! If it had static types, easy simd support, complete Qt integration, value types and mandatory unboxed primitives, if it was possible to define non-trivial compile-time assertions and type checks (though maybe some LISP dialects can ? are there statically-typed lisps with the ability for arbitrary type computations ?), if normal programs with normal libraries in the LISP ecosystems could be entirely written without a GC, etc etc... and I'm sure I'm forgetting the other half of the absolute bare minimum of my requirements for the programming languages I use for my day-to-day tasks. Saying that parsing an AST is on its own a justification for using LISP, is very much like saying that one should use smalltalk or erlang instead of $LANGUAGE every time they implement a message-passing system: at best worth of a shrug. There's a reason why all the projects listed here: https://github.com/celtera/avendish#future-directions https://github.com/celtera/avendish#future-directions are C++ :)
- mbrodersen 5y agoAbsolutely! The same way that Lisp is a poor substitute for C and C++. All languages/systems/libraries/frameworks have things they are good at and things they are bad at. Which is why we don’t all use one language/library/framework/… for everything.