I've been trying to come up with a new unique list comprehension syntax for my toy language. I'm aiming mostly for readability without adding too many special characters/keywords. Any ideas?

@kyle what does the rest of your language look like?

[fn] each [element] of [list] is pretty readable for the basic case.

@whtrbt Here's the project, the readme should give you the gist

It's a logical/functional language

@kyle ah yes, I see my suggestion is way too keywordy!

@whtrbt I do like that, and it's not to far off from python. I'd like to avoid the special keywords if possible... using something that can be built in to the language.

But to contrast, I think javascript's built in list methods are clunky. `.filter(...).map(...)` make for long lines or oddly placed line breaks.

I think it's a tricky balance but I'm really curious to what could be.

Sign in to participate in the conversation

Revel in the marvels of the universe.