17 comments

[ 4.9 ms ] story [ 36.4 ms ] thread
I've wanted something like this for quite a long time. I've spent quite a bit of time trying to grok OCaml, Haskell, and Lisp syntaxes, and I've never gotten to the point where I "see past the syntax". Even if you like these languages and their syntaxes, you should be excited about projects like these which help to bridge the cognitive gap between mainstream imperative languages and functional languages--more people getting exposure to functional ideas is a good thing for you--learning syntax and functional concepts in tandem is more difficult than the sum of the constituent parts.

EDIT: Sadly, this project hasn't been touched in 2 months.

Oooooooh, have you heard of Reason[1]? It’s an algol-ish interface for OCaml, supported and used by FB as well!

Also interops with JS (and has superb bindings for React) so immediate results/learning are very easy to get.

[1] - https://reasonml.github.io

It doesn't have bindings for redux. I really wanted to like it but without redux, it's not practical enough with so few bindings.

The messenger people don't know what to do about that either, really.

I really like the language though so it's a shame.

What is it about Redux that you need?
I need a store layer which scales. Mobx could work too, but reason would work more naturally with redux.
I have! Sadly it’s native compilation story was pretty poor last I checked. Mostly it seemed like the primary target was bucklescript. There were other issues as well.
Ah, until I read your"EDIT", I was about to ask the creator why the following binding ends in a semicolon:

define y = 12;

but the following one does not:

define fn(x) = { ... }

Of particular interest in this language is the "then" and "back" syntax [0]. It looks like a somewhat different take on iterators, which I can see being more "readable" in certain situations. I haven't had a chance to try it out, but it seems like it may allow for some interesting behaviors.

[0]: https://github.com/billhails/PyScheme/wiki/Then-and-Back

It feels something like a generator that has been hoisted up into the language so that it acts like a single value (which defaults to the first element in the generator).
It was first written in Perl so that makes sense.
Can someone explain https://github.com/billhails/PyScheme/wiki/Here ?

The example warped my brain a little.

It is just call/cc from scheme. Here calls a function with the current continuation which means you can either do an early return, like the example where they "replace" the current continuation with the value 3.

In scheme you can save that continuation and return to it as many times as you want, which people from other languages have a hard time to wrap their head around. I'm rather sad that they chose to implement undelimited continuations, since that is almost never what you want.

First class continuations are a fantastic tool in your language. They can be used to implement coroutines, fibers, nondeterminism and so on. Really no surprise that they are a part of scheme, which usually pick a few well thought out primitives that combine into nice high level abstractions.

I never get it when I see things like this (Reason, etc). I love the ML flavored syntaxes. Elm really seems the nicest to me.
F natural is a cute name, but F# will always be a half step above.