[HN Gopher] Par: Process language with an interactive playground...
       ___________________________________________________________________
        
       Par: Process language with an interactive playground for exploring
       concurrency
        
       Author : todsacerdoti
       Score  : 48 points
       Date   : 2025-02-02 18:41 UTC (4 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | 082349872349872 wrote:
       | inspired by
       | https://homepages.inf.ed.ac.uk/wadler/papers/propositions-as...
        
       | TOGoS wrote:
       | This is pretty neat.
       | 
       | My criticism is that the syntactic sugar and trying to make it
       | 'look like' a different language actually just obfuscates what's
       | going on and makes things more confusing. e.g. as I undnerstand
       | it                 channel { foo[bar] => {         ...baz...
       | } }
       | 
       | Means 'when you receive the token 'foo' from channel, read
       | another value from it, call it bar, then do the stuff inside the
       | braces'. The `foo` and the `=>` are tightly linked; `[bar]` is
       | in-between lexically but logically the order is:
       | channel { foo => {         channel [bar]         ...baz...
       | } }
       | 
       | i.e. it doesn't make sense to think about the `[bar]` part until
       | after the `=>` has done its job of matching 'foo'.
       | 
       | In the same vein, putting "!" and "?" directly after some other
       | token makes it look those go together, but they are separate
       | things.                 caller.empty!
       | 
       | Sends 'empty' to caller, then closes caller. Maybe just writing
       | this with spaces between the parts makes it more clear:
       | caller .empty !
       | 
       | Parentheses and square brackets are more about what's inside them
       | than what's outside; `.foo` means 'send literal symbol 'foo'',
       | `(foo)` means 'send value named foo', and `[foo]` means 'accept
       | value and call it foo'. All represent operations to be performed
       | on 'the channel in question', but by shoving things together it
       | 'looks like' a method call or something to someone used to
       | looking at C-like languages.
       | 
       | I am mentally putting spaces like that in there as I read through
       | the README.                 channel .foo (true) [bar]
       | 
       | and so on.
        
       ___________________________________________________________________
       (page generated 2025-02-06 23:01 UTC)