Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Par: Process language with an interactive playground for exploring concurrency (github.com/faiface)
60 points by todsacerdoti on Feb 6, 2025 | hide | past | favorite | 4 comments


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.



Seems like for OP, "(his translation/elaboration of) CP more optimal than GV" isn't just an opinion?

Why might this be the case? Something to do with (: a handful of)

  results ">" arguments
?(A mouthful, pace Lichtenberg)


Oh, it's going to have linear types like Austral... https://borretti.me/article/introducing-austral




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: