This Engineering Notebook post discusses an impractical project, the 
indented_languages plugin. Please feel free to ignore the plugin and this 
post :-)


*tl;dr:* See the summary.


*The indented_languages plugin*


The indented_languages plugin (See #3574 
<https://github.com/leo-editor/leo-editor/issues/3574>) deletes curly 
braces in C, Rust, and Typescript. The plugin even attempts to delete *some* 
parentheses 
in Lisp programs!


Few people (including myself) will want to use this plugin. This project 
has an ironic value. It has shown me what *won't* work. As a result, I have 
a clearer picture of what's next.


*Dismissing a pet peeve*


Python showed, long ago, that curly braces are cruft. Nevertheless, 
language designers continue to use curly braces. It's a pet peeve.


The plugin allows me to make peace with this situation. I can *study* programs 
without the cruft. There is no need to convince anyone that curly brackets 
should go!


*Removing parens from Lisp*


The plugin also attempts to remove parens from Lisp. The work has been fun 
in a weird way. Lisp interpreters written in Lisp contain mutually 
recursive calls to eval and apply. Similarly, the plugin contains mutually 
recursive calls to parse and to_infix.


But removing parens from Lisp is a fool's errand! The plugin would have to 
support *all* "special forms," a daunting challenge.


This failed prototype reminds me why I never *ever* want to use or read 
Lisp!


*An Aha re sentinel lines*


The plugin also tries to convert Lisp's prefix operators to infix 
operators. Naturally, doing so would rearrange characters. But (Aha!) this 
means the Lisp converter must tokenize the input instead of using sentinel 
lines. 


*Summary*


I don't recommend the indented_languages plugin for anyone, including 
myself. You could call it a quickly failed prototype.


Still, my work on this plugin has been worthwhile. It has shown me what 
*won't* work. I now have a clearer picture of what's next after Leo.


Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/43526e14-f0a2-47cf-a2d9-26bc424b0876n%40googlegroups.com.

Reply via email to