I like the parenthesis.


The thinking process is very much like "thinking in Sets" when building a 
complex SQL  statement.

The result is a lot of power in an dense, elegant expression.



If, as is often the case with me, I find a nested expression as below too 
complex, it is very easy to decompose it.



I realize this is just a preference, but the denseness forces me to think in 
Objects and composition rather than process.



just my .02 cents.



cheers.






---- On Wed, 26 Jan 2022 04:19:39 -0500 Kasper Osterbye 
<kasper.oster...@gmail.com> wrote ----



Cheers all 
 
I have noticed that I often ends up with quite a number of nested expressions, 
for example: 
 
(((json at: 'tree') 
    select: [ :e | (e at: 'type') = ‘blob' ]) 
        collect: [:e | Path from: (e at: 'path')]) 
            select: [ :p | p segments last 
                in: [ :name | (name endsWith: '.md') | (name endsWith: '.mic') 
] ] 
 
What kind of proposals (if any) have been for a different syntax which could 
give a more streamlined syntax? 
 
My own thinking has been around an alternative to the cascade semicolon. What 
symbol to use does not matter for me, but something like 
json at: ‘tree' º 
    select: [ :e | ((e at: 'type') = 'blob’)]º 
    collect: [:e | Path from: (e at: 'path’)]º 
    select: [ :p | p segments last 
        in: [ :name | (name endsWith: '.md') | (name endsWith: '.mic') ] ] 
 
Basically, a send the right hand expression to the result of the left hand 
expression. 
 
Has anyone ever tried this, or is it just one of the many small annoyances best 
left alone? 
 
Best, 
 
Kasper

Reply via email to