this post was submitted on 29 Jan 2021
2 points (100.0% liked)
Asklemmy
44656 readers
829 users here now
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
- Open-ended question
- Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- [email protected]: a community for finding communities
~Icon~ ~by~ ~@Double_[email protected]~
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
AFAIK, you /can/ use the parentheses as tags in XML, ... but it's okay if it's not for you!
I think you mean SXML which is a variation of XML with S-Expressions.
But what I mean is writting Lisp like a XML tree which would be pretty similar to SXML for readability.
I actually haven't heard of SXML, so I meant regular lisp. For me, I just mean that this is pretty tree-based, so far as I can tell (I'm not an actual programmer, though, which might be the issue with my understanding):
This is an XML tree:
This is an SXML tree compared with an XHTML (XML based HTML) tree:
SXML uses the standard S-Expressions syntax but what I expect is being able to use more this:
I think that most people liking Lisp don't want to change the current formatting standard and maybe most of them have eagle view or a good "mind parser" but it is more readable for me writing like this. I can identify errors easily and I don't have to count the parenthesis as I have been doing for reading Scheme and Lisp basic programs well.
I also combine this with tabulation of 4 characters instead of soft-tabs (real white spaces) of 2 characters like some people do due to the JS influence.
Oh, well if you just mean a formatting thing -- you can format a source file however you want :) But yeah, that's not really the popular way to do it. For me, just the opening tags + indentation work well enough to delimit everything, but to each their own.
:3