5 ms·
The irony of the 2 + 3 = 5 example is that it shows how domain-specific languages work best with iconic forms. Paralinguistic symbols as constituency tends towa
by rileyphone 4y ago
The irony of the 2 + 3 = 5 example is that it shows how domain-specific languages work best with iconic forms. Paralinguistic symbols as constituency tends toward mismatched metaphors and visual sameness. However, crafted carefully, such tools represent the best available to tame complexity.
There is a level of metaprogramming even more fundamental than Lisp macros - the ancient and maligned fexpr [0]. They are almost as if you took lambda and just didn't evaluate the args when called by default. In fact, this is what Kernel [1] elegantly showed, bringing along with it the pure notion of a vau calculus, which can help restore optimization techniques who's absence resulted in the original defamation of the fexpr.
[0] https://fexpr.blogspot.com/2011/04/fexpr.html https://fexpr.blogspot.com/2011/04/fexpr.html
[1] https://web.cs.wpi.edu/%7Ejshutt/kernel.html https://web.cs.wpi.edu/%7Ejshutt/kernel.html
- gone35 4y ago"Paralinguistic symbols as constituency" You mean constituents? Or operands? "Paralinguistic" I think you mean syncategoremata? "Iconic forms" ? "vau calculus" Interesting. For the interested, see: https://web.wpi.edu/Pubs/ETD/Available/etd-090110-124904/unrestricted/jshutt.pdf https://web.wpi.edu/Pubs/ETD/Available/etd-090110-124904/unr...
- taneq 4y ago> "Paralinguistic" > I think you mean syncategoremata? I think this is the most HN thing I've ever read on this site. :D
- jnash 4y agoI think you will be more successful communicating your ideas if you use less obscure language. Assuming of course that you are actually trying to communicate ideas and not just trying to virtue signal intelligence or education by being intentionally obfuscated.
- fmakunbound 4y ago> Paralinguistic symbols What’s that? I googled and am still confuzled.
- DonHopkins 4y agoMaybe he means "foo" and "bar", the canonical metasyntactic variables. https://en.wikipedia.org/wiki/Metasyntactic_variable https://en.wikipedia.org/wiki/Metasyntactic_variable
- rileyphone 4y agoYeah, apologies for being a little obtuse. Things that look like words but don't act as typical verbal language.
- Alan_Dillman 4y agoI don't know either, but in English one definition/sense of para is "beyond", so it is "beyond language symbols", which shapes up to be something in the sense of a sort of programming paradigm where everything is subject to redefinition, particularly on the fly.
- samatman 4y agoFor our purposes we can call them 'glyphs' without much, if any, loss of generality.
- Sniffnoy 4y agoSo what's the difference between fexprs and macros? Can you give an example that illustrates it?
- rileyphone 4y agoConsider this answer from lispm as to what fexprs can do that macros cannot, namely being first-class objects in the language that can be stored and passed as values, just as a number or a function can be. https://stackoverflow.com/questions/13393673/how-do-you-store-a-macro-in-a-variable-in-common-lisp-sbcl https://stackoverflow.com/questions/13393673/how-do-you-stor...
- Sniffnoy 4y agoI see, thanks! Is that the only additional capability or is there more?
- rileyphone 4y agoThey have the advantage of making macro writing a good deal simpler, by providing a higher-level control over metaprogramming. The effect is almost like CLOS-style classes in comparison to C++ classes - a more complete metaphor (metaprogramming/OOP) is more difficult to implement and optimize, but makes up for in improved programmability. Of course this is all highly subjective. Perhaps fexpr was just a weird language construct that introduced more problems than it solved. I think it is an unexplored avenue that was brought to light again by Kernel. You really need fexprs to get a true programmable programming language in the sense their are no exceptions. Maybe the cost can become reasonable.
- Sniffnoy 4y agoI mean I'm asking about concrete differences in how they fundamentally work, since I'm not familiar with fexprs in the first place, and (as someone who doesn't use Lisp) not very familiar with macros either. I'm not asking about larger consequences like the sort you describe in this answer.