A human-friendly DSL for ATProto Lexicons
26
fork

Configure Feed

Select the types of activity you want to include in your feed.

Semi-colon for defs #8

open opened by vmx.cx

This is feedback from someone just getting started with MLF. I find it useful to get feedback for my projects from users that first use it as they don't have an in-depth understanding yet, which sometimes uncovers things I just got accustomed to. Hence this comment.

I was surprised that defs need a semi-colon but records are not allowed to have one. I prefer having less semi-colons, so I would drop them from the defs. Though there can well be a reason to have them, which I didn't understand yet. So feel free to close this as a won't fix.

There are also two examples where they are missing:

https://tangled.org/stavola.xyz/mlf/blob/52d38883/website/content/docs/language-guide/08-imports.md?code=true#L138 https://tangled.org/stavola.xyz/mlf/blob/52d38883/website/content/docs/language-guide/08-imports.md?code=true#L175

There are also other keywords that need a semi-colon, I just picked def as an example.

Yeah... I think I could review all the semicolon usage and perhaps drop them. I waffled a bunch on the syntax, so its no surprise to me that some stuff isn't super consistent.

I think my thought process here was "well there is an equals sign here so it should feel like a normal declaration a lรก Rust," but in retrospect perhaps that doesn't exactly follow.

I thought about this some more and I think I'll keep it this way since syntactically it is similar to Typescript (interface and type defs) and Rust (structs and type aliases). We may revisit this in the future though, as I can easily see there being the need to do a holisitic review once we get our hands dirty with real world usecases.

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:3mdq56yhyqq5k6d4guztheaf/sh.tangled.repo.issue/3mjercuaz4w22