Reason: A new interface to OCaml - <AUTHOR> http://facebook.github.io/reason/ <comment><USER2> This looks very interesting. I've always had OCaml in mind but never actually got around to using it in a project. Facebook could have done a better job describing what exactly this is, but they do provide a good overview at the end of the page (strangely!) [1].

In summary, Reason [2] is a new language (correction: interface to OCaml) that shares a part of the OCaml compiler toolchain and runtime. I don't know of any language that uses a similar approach, that is, plugging into an existing compiler toolchain. I guess a reasonable yet inaccurate analogy would be Reason -> OCaml is like Elixir -> Erlang or Clojure -> Java.

I hope Reason can provide OCaml with the extra push needed to bring it into the mainstream PL space and more widespread adoption.

[1]: [http://facebook.github.io/reason/#how-reason- works](http://facebook.github.io/reason/#how-reason-works)

[2]: [https://github.com/facebook/reason](https://github.com/facebook/reason)

<comment><USER3> I always liked ML family PLs, but my problem with OCaml is lack of good stdlib. This is why I never invested a lot of time in to it sadly. Reasons looks like a more solid out of the box ocaml distribution which I actually like a lot. Will play with it.

<comment><USER4> Glad to hear it! We've also tossed around the idea of having a precompiled standard lib come with it upon installation. We're certainly not looking to _increase_ the number of standard libraries, when there's already so many to choose from, but including/pre-building/curating is certainly within the scope.

<comment><USER5> This would be so interesting! I don't know any other language that has made this before. But if the intention is to increase the reach of OCaml then if sound like a great plan.

</comment></comment></comment></comment><comment><USER6> I hope this doesn't sound like trolling, but JavaScript's syntax is now a selling point? I kinda-sorta get the reason why people want an actual JavaScript _stack_ on the backend, but I never heard that syntax/semantics brought people from e.g. Rails to Node.

Sure, OCaml isn't even the nicest syntax in the ML family, but I'm not sure whether that's worth it, especially considering that almost any "X-like" language often turns out to be an Uncanny Valley for "X" programmers -- close enough to make some frustrating errors.

<comment><USER4> Jordan here (I work on Reason)

I've mentioned elsewhere that the primary goal for now was to get the tooling automated as much as possible, so that when we receive common feedback, we can adapt to that feedback and trivially migrate people's code forward.

I don't think JavaScript's syntax is a selling point and I am someone with a lot of JavaScript experience. I also don't think that OCaml's syntax today is a selling point, and I have a bit of OCaml experience. Both of these syntaxes have evolved over time, working within that limited precious syntactic real estate, trying so very hard to maintain compatibility with decisions made decades ago. Reason's approach is totally different in that it knows we won't get it right on the first shot so it puts into place the tooling for upgrading and beautifying as we learn lessons and take feedback from the community. It places the syntax closer to the user, even if only conceptually.

That being said, the current syntax is not intended to be a JavaScript clone by any means. It actually started in the opposite manner - by taking the top 15 complaints about OCaml's syntax, by experienced OCaml programmers (not JS programmers) and fixing them. There were a couple of things that didn't really matter (such as how you express comments) that were just changed to be more familiar because, well.. simply they don't matter, and even experienced OCaml developers want the largest possible set of people to be able to read their code as long as that comes with little other tradeoffs.

<comment><USER7> I am not a fan of introducing curly brackets in a similar way I am not a fan of curly-bracketisms in F#, it makes for a clumsy noise to a relative distraction-free language like OCaml. It feels like trying to get Algol-family programmers on board, whereas OCaml users have been using ( and ) as well as begin/end since a long time.

But an advantage I see with the new comment syntax is that there are is that there is no ambiguity what the hell (*) is. At least this.

<comment><USER8> Curious what are the curly-bracketisms in F#?

<comment><USER9> Expressions of various kinds - Async, seq, query, etc; record type "constructors"... that's all I can think of off the top of my head.

F# in general is a beautiful language though, I can't say I've ever thought about the "curly bracketisms" personally because I'm too busy being excited about how much fun it is to write over C#.

</comment></comment></comment></comment></comment><comment><USER10> I for one welcome the syntax. I run the OCaml meetup in Silicon Valley and syntax is definitely an issue for newcomers. This makes it easier for other programmers to instantly just jump into OCaml/ML rather than ask about what is `in` or what is `let foo = function`, etc etc.

EDIT: Hosting a Meetup this friday at 6pm in San Francisco about Reason and how to instantly start using it, [http://www.meetup.com/sv- ocaml/events/231198788/](http://www.meetup.com/sv-ocaml/events/231198788/)

<comment><USER11> This definitely makes me feel more warmly toward OCaml. Syntax has kept me away in the past. It's silly, but it's really hard to evaluate a language if you can't read the examples.

<comment><USER12> > It's silly, but it's really hard to evaluate a language if you can't read > the examples.

No, this is not a silly notion. But I don't think the difference Reason makes is as big as you think. I mean, I don't really believe that you can read this:

      let foo = if (cond) { x } else { y };
      foo + 1

but not this:

      let foo = if cond then x else y
      in
      foo + 1

<comment><USER13> The 'in' is what makes it difficult to understand for someone not familiar with OCaml syntax and semantics. Reason makes it easier.

<comment><USER12> I've heard that said, but I don't see how it's a big deal. OK, the very first example introducing let bindings would have to come with a sentence like "the 'in' part of 'let ... in' means 'in' just like in English: 'let' the binding be valid 'in' what follows". You don't _have_ to define a whole new syntax where a single sentence in a language tutorial might be enough.

But I admit that I probably can't fully appreciate whether this is really difficult for someone used to JavaScript.

<comment><USER4> Except when you're in the top level - in which case you don't use `in`. Oh, and don't forget all the nuance of interleaving imperative commands. I'm an experienced OCaml dev and this trips me up (the "ml compared" section of the docs lists some common pitfalls that Reason resolves).

<comment><USER12> Ah, but here you seem to be talking about when to _write_ 'in'. _Reading_ it is much simpler: Just ignore that it's there, and voilà, you're set.

(I'm an experienced OCaml dev and := versus <\- trips me up from time to time when choosing which one to write, but not when reading code.)

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> Wonder if this project has anything to do with Eric Lippert's move to Facebook ([https://ericlippert.com/2016/02/08/facebook/](https://ericlippert.com/2016/02/08/facebook/) \- Eric has also been producing a series of blog posts implementing a Z-Machine interpreter in OCaml to run mini-Zork on, starting here: [https://ericlippert.com/2016/02/01/west-of- house/](https://ericlippert.com/2016/02/01/west-of-house/)). Eric was on the C# compiler team at Microsoft and previously worked on JScript.

<comment><USER15> damn, i recently started writing a z machine interpreter in ocaml, and now i both really want to read those posts and really don't want to be influenced by lippert's design decisions before i've at least gotten my own project solidly underway.

<comment><USER16> It's always better to know about the design decisions others have taken. If they faced the same choices you did, you can know their view on the tradeoffs (and experiences with their choice) and choose the same way as they did or choose differently, but either way you make your choice with a little more knowledge. If they come up with an idea you didn't even think of, surely you want to know about it, even if you aren't actually going to use it.

<comment><USER15> if i were doing it as something intended for serious use, i'd definitely want to see how lippert did it. but the point of doing this (other than the whole rite-of-passage aspect of writing a z machine :)) is the challenge of designing and implementing it from scratch, and hopefully as cleanly and compactly as possible. if i read lippert's blog and he came up with an idea i didn't think of _after_ i had already solved it some other, potentially worse way, i'd be delighted to see that it could be done better. if i see his solution to some piece that i haven't even implemented yet it would just tempt me to simply adopt his solution.

</comment></comment></comment></comment><comment><USER17> I know that it's common to have namespace collisions, but their logo is _so_ similar to Reason magazine's. [https://reason.com/](https://reason.com/)

<comment><USER18> There's also a DAW called Reason: [https://en.wikipedia.org/wiki/Reason_%28software%29](https://en.wikipedia.org/wiki/Reason_%28software%29)

<comment><USER19> ... and the Neal Stephenson fan in me was just a smidgen disappointed that this was not the introduction of a hypervelocity flechette gatling railgun.

</comment></comment></comment><comment><USER20> There's a screencast fresh off the presses on the info page at [https://ocaml.io/w/Blog:News/A_new_Reason_for_OCaml](https://ocaml.io/w/Blog:News/A_new_Reason_for_OCaml)

I'm finally going to switch away from my ancient nvi setup and use Atom instead! MirageOS recently moved all our libraries over to using the new PPX extension point mechanism in OCaml instead of the Camlp4 extensible grammar. This means that MirageOS libraries should be compatible with Reason out of the box -- so it'll be possible to build unikernels from a slick editor interface quite soon hopefully!

<comment><USER21> Is nuclide good enough? A few weeks ago, a lof of merlin features were still missing. As was the auto-indentation.

<comment><USER4> The Atom Reason plugin uses Nuclide's system for error rendering (in the diagnostics bar), and type hints. But the actual logic for integrating with Merlin has been completely rewritten in Reason itself, and compiled from Reason into JS to run as an Atom plugin. So there are still merlin features missing because the Atom plugin is relatively young, but if you want to help us implement the missing features, it can be a fun way to try Reason itself (compiling to JS).

<comment><USER21> I love the fact that ocaml compiling to js allows us to configure tools like Atom. I will have a look at the plugin. Thanks for the informations :)

<comment><USER4> Yeah, if you peak inside the source code, you'll see we've implemented a `Reason` binding to the `Atom` JS plugin API.

</comment></comment></comment></comment></comment><comment><USER22> I started off a bit skeptical with the <\- renaming to =. Mutability should be rare enough that <\- makes things stand out. But apart from that I think I rather like this syntax, on the whole. Not a fan of semicolons. It also makes me appreciate F#'s #light syntax (now its default). Using whitespace really clarifies stuff, and there's always in and ; for fallback.

What's OCaml's status with multithreading? Are there any proposals for more flexible operators, so there doesn't need to be different operators for different numerics? (F# solves this by allowing inlined functions.)

<comment><USER4> I suspect the syntax of `<-` (or lack thereof) will be a common topic of discussion. Let's see how various audiences respond to this change and then discuss if we'd like to restore `<-` for mutation. Personally, I don't use a ton of mutations in my code so I have less at stake and if there's anything we can do to appeal to a wider audience, I'm inclined to give it a shot.

<comment><USER23> Maybe I'm too used to Ocaml to comment but I think using `=` for mutation is a bit misleading because it might make it appear that `x.mutablefield = bla` and `let x = bla` are the same thing, which is the case for typical imperative languages (but definitely not for Ocaml).

BTW, one thing that I do find awkward about Ocaml's syntax is the difference between := and <-. Dunno if its possible to unify them in a sane manner though.

<comment><USER24> F# doesn't unify them, but it makes := largely redundant by letting you do "let mutable ...", and then assign to it with "<-" \- so you simply don't need to use refs if you just need some mutable data (you still need them if you want to have a closure mutate something it closed over).

<comment><USER25> `ref` and `mutable` were unified in F# 4.0. You no longer need to use a `ref` when closing over a mutable value, you can use `let mutable` in all cases and the compiler will figure it out for you. The generated code is the same as before, it's just that there's a unified syntax now.

There is an optional warning one can enable which emits when a `let mutable` is converted to a `ref` behind the scenes - for those who want to by hyper- aware of hidden allocations.

</comment></comment></comment></comment></comment><comment><USER26> Nice to see that OCaml is getting so much love at facebook. Unfortunately, adding a new syntax that's almost OCaml, but not quite, doesn't seem like such a great idea. While it might make the language accessible to more people, it runs the risk of fragmenting the community.

I know syntax is subjective, but some of the choices seem a bit odd. For example, declaring variants and using their constructors looks like Haskell, but the semantics is still OCaml. In Haskell, constructors are first order so they can be passed as functions, and partially applied. It makes sense that their declaration and use looks like function declaration and function calls. In OCaml they are not first class, that is, you can't pass the as arguments, or partially apply them. That's why it makes sense for the declaration to look like a tuple, and the use to look like a function applied to a tuple--well, somewhat, you can still argue that it's still confusing because you might expect to be able to apply the constructor to a tuple variable, but well, such is life :). Unless constructors are first class in Reason--it doesn't look like it from a quick scan through the docs--this particular syntactic difference is of dubious value, and, worse, it can be misleading to newcomers.

Also, changing `match` to `switch` seems gratuitous as well, and it also loses some of the meaning of the original. i.e. "I want to match this value against this set of patterns".

Finally, I know that using `begin` and `end` for blocks is verbose and Pascal- ish--which people seem to hate for some reason--but using { } for scopes looks out of place, and leads to awkward cases like this:

        try { ... } { | Exn => ... };

I don't mean for this to sound ranty, or like I'm picking on Reason. I think it's good that facebook is tryiog to spice things up in the OCaml community.

<comment><USER4> > In OCaml they are not first class, that is, you can't pass the as arguments, > or partially apply them. That's why it makes sense for the declaration to > look like a tuple, and the use to look like a function applied to a tuple-- > well, somewhat, you can still argue that it's still confusing because you > might expect to be able to apply the constructor to a tuple variable, but > well, such is life

If I understand what you're saying, you provided a reason why variant arguments should not look like function application (because they have different semantics than function application), and then in the same paragraph suggested that variant arguments should have tuple syntax, while admitting that they don't actually have tuple semantics either.

The truth is that variant arguments in `Reason` actually do _not_ have function application syntax - note the distinguishing, leading capitalized letter on the variant. Sure, they share the fact that arguments are specified via a space separated list, but function application doesn't have a monopoly on the syntactic pattern of things separated by spaces. The argument quickly breaks down.

<comment><USER26> I didn't say constructor arguments don't have tuple semantics :). In OCaml tuples are a "unit", i.e. you can't use (,) as an operator. In that sense they match with the constructor semantics: it needs all its arguments at once. It's the constructors not being functions that I was complaining about. Also, I'd say that capitalisation alone is not enough to compensate for constructors looking like they're curried functions. But that's just a matter of taste.

</comment></comment></comment><comment><USER27> The slowness in Firefox appears to be solely due to this:

      @media (min-width: 1180px) {
        body:not(.no-literate) .content-root {
          background-color: #fdfcfc;
          -webkit-box-shadow: inset 780px 0 #fff, inset 781px 0 #e7e7e7, inset 790px 0 3px -10px rgba(0,0,0,0.05);
          box-shadow: inset 780px 0 #fff, inset 781px 0 #e7e7e7, inset 790px 0 3px -10px rgba(0,0,0,0.05);
        }
      }

Removing it in the Firefox style editor restores normal performance.

Edit: And they have commented out the box-shadow! Hah.

<comment><USER28> I've been dealing with this lag in firefox for the past 6 or 7 years. It's hilarious to me that they still haven't fixed it. Just one of the reasons I've been extremely negative on firefox.

<comment><USER27> This is the first time I've seen something like this. I use Firefox full time for development and personal use and do a lot of front-end work. ¯\\_(ツ)_/¯

</comment></comment></comment><comment><USER29> Ok, it might be the end of the day for me and I'm denser than usual, but I can't understand what is this? Ocaml to JS transpiler?

Checked this out, but the reason still eludes me: [https://ocaml.io/w/Blog:News/A_new_Reason_for_OCaml](https://ocaml.io/w/Blog:News/A_new_Reason_for_OCaml) (pun intended)

<comment><USER30> I feel like FB needed it and also released it to the public, but outside of FB, there's little Reason to use it.

<comment><USER15> it's a really well-thought-out set of improvements to the ocaml syntax, done by people who actually seem to appreciate MLish syntax for the most part (rather than trying to get it to look more like C for its own sake, a la mythryl)

</comment></comment></comment><comment><USER31> I've worked on the Atom plugin for this, itself written in Reason and compiled to JS using js_of_ocaml: [https://github.com/facebook/reason/tree/7f3b09a75cacf828dd6b...](https://github.com/facebook/reason/tree/7f3b09a75cacf828dd6be23c89a53a8a85d89912/editorSupport/atom- reason).

Having worked with Reason, JavaScript, and the bridge between the two, most of my errors seem to fall on the JavaScript side. So I guess the type system's indeed working =).

</comment><comment><USER32> Site doesn't load in Firefox. Works in Chrome.

<comment><USER33> Incredible, but you are correct. Pegs 1 CPU in FF and while it loads, it barely scrolls.

<comment><USER4> Pretty sure it was the gif. I've disabled it. Could you try again?

<comment><USER34> It's still hanging firefox for me. You can install firefox and try it yourself: [https://getfirefox.com](https://getfirefox.com)

</comment></comment></comment></comment><comment><USER35> I love OCaml, but that's a really nice reshape of OCaml syntax! And apparently things will be interoperable. I am really curious to see where it goes.

EDIT: and they want to use and maintain compatibility with ppx. Great news

<comment><USER4> Interop with OCaml is perfect and should remain so. ppx should work (modulo issues that we're not aware of).

You can even upgrade your existing OCaml source code to be in the Reason style by using the versatile `refmt` program that is included.

<comment><USER35> Thanks. I am definitely going to play with it!

</comment></comment></comment><comment><USER36> If you'd like to play with Reason you can do it online here:

[https://codeboard.io/projects/17520?view=2.1](https://codeboard.io/projects/17520?view=2.1)

Of course, you can also create your own Reason projects.

</comment><comment><USER37> Looking at [http://facebook.github.io/reason/mlCompared.html](http://facebook.github.io/reason/mlCompared.html) it looks like regular OCaml, with a sprinkling of JS syntax.

<comment><USER4> For now, that's somewhat accurate. If you check out the JS comparison page, you might say it looks like JS with OCaml's influence.

The point of the syntax toolchain is actually not to get it right on the first try but to make something viable that is easier to learn/read, avoid bike- shedding, and put all the right tooling in place so that we can very seamlessly upgrade after taking in feedback. It's pretty liberating to know you have that ability to move forward rapidly and automate all of the upgrades.

</comment></comment><comment><USER38> Website fries the CPU (FF).

<comment><USER4> Sounds like FF can't handle gifs, but Chrome/Safari do a good job. I've disabled the gif on the main page just to be friendly to FF while I figure out a better approach. Thanks for the report.

<comment><USER38> I can run the Unreal engine, use google maps but not view your website. I'm not convinced Firefox is at fault here.

Is there any interactive functionality that your website offers that would justify extraordinary demands or does it simply display some text and images?

<comment><USER4> It turns out it was the drop shadows, and only were an issue in Firefox. I don't know what to make of the fact that we can run Unreal but we can't render drop shadows performantly. Maybe we should build web pages using WebGL.

<comment><USER39> Normally the easy answer is to turn off Javascript, but in this case it makes the whole thing completely fail to render. For a site that's just showing you some text.

Some days you just can't win.

</comment></comment></comment></comment></comment><comment><USER40> Nice, but I always wonder why function is abbreviated as the longer unambigous fun and not just fn?!

<comment><USER4> Jordan here (I work on Reason):

I agree with you but one benefit of `fun` is that it aligns better with multiples of two spaces. It's important when lists end up wrapping:

        /* Nice multiple of two spaces */
        fun myFun
            xyz
            abc => {
          doSomeThings(xyz, abc);
        };

        /* yikes, only one horizontal space between
         * doSomething and abc on the line above */
        fn myFun
           xyz
           abc => {
          doSomeThings(xyz, abc);
        };

I'm obviously no stranger to bike-shedding!

<comment><USER40> Not a good enough reason, sorry! With syntax coloring, it's less irrelevant as well.

<comment><USER4> When we start talking about syntax coloring, you know we're just one step closer to actually debating the color of a literal bike-shed!

Jokes aside, what would your highlighting do in this case?

<comment><USER40> It would make the function name stand out from the parameters. Again, to pick one unintuitive abbrevation, just because it's a 3-letter one like let, it's just not serious! Make all be 3:

        type -> typ
        switch -> swi
        if -> iff
        else -> els
        in -> inn
        downto -> dow
        module -> mod

Call you language 3-letter reason. You see how it ridiculous it gets? You can't make all keywords be 3-letter and if people care about alignment, they can further align, but most don't care as much as you think!

<comment><USER4> It doesn't have to be three letters, keywords can be odd numbers and achieve a similar effect - also, we likely _will_ use the `mod` keyword instead of `module` fwiw.

<comment><USER40> That would be another poor choice as "mod" is used as "modulo" \- there's no need to abbreviate "long" words like "module", because they are not used so often and bringing ugliness and confusion just to save a couple of characters per file is not worthy!

In this case, you don't even need the "fun" keyword as syntax-wise, "=>" alone can be used like in other languages as (parameter1, parameter2) => parameter1 + parameter2, for example - it's obvious enough without having to prefix with anything!

Anyway, I see that you want to be "different" in hopes to be "better", but, indeed, you're just "weird", instead.

"+." for float addition, "^" for concatenation, etc.

"(" <val> ":" <type> ")" instead of the shorter and more readable <val> "as" <type>.

For example, why did you choose "mutable" and not "mut"? See, your language is full of inconsistencies, it's not well-thought, it's not intuitive! For example, you chose "rec", which usually means "record" for "recursive"! In your "for"-loop, you have just "to", not "upto", but then "downto"! A good choice borrowed by some old languages would be to use the optional "by" <step>, which defaults to +1, but in a case of a "downto", would be -1, and thus giving you a more powerful loop!

<comment><USER4> You don't know of any other languages that use `mod` to represent "module"? Say, perhaps, the one you just advocated for in another thread?

And there _are_ in fact issues with using x => y syntax for lambdas without a leading fun/fn keyword:

let x = (this, is, a, really, long, thing ) => 10;

\- In that example it's not possible to tell if the leading ( is the start of a pattern for the sake of lambda, or a tuple. This happens with ES6 today as well (destructured record argument). It's not just a matter of human readability, it's a matter of building an efficient parser.

\- The (x : y) syntax for type annotations is not new or weird to many people. That's the syntax used by ML, OCaml, and JS (Flow).

\- We're likely going to swap some operators for string concat, so that it would be the more common ++ operator.

\- The rest of the observations are good and we should address them soon.

<comment><USER40> I know Rust uses "mod", but Rust is consistent and predictable - it also uses "mut" unlike in Reason.

Regarding ":" to denote type - I like it and it's widely used across various language, but not enforced with parentheses for typecasting.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER41> Do want to learn this - does anybody know any interesting projects that can take advantage of the OCaml ecosystem and functional aspects?

<comment><USER42> How about building functional operating systems and unikernels: [https://mirage.io/](https://mirage.io/). Since Reason is fully compatible with OCaml, you can build your own Reason unikernels on top of MirageOS libraries. Here is a list of mirage OS pioneer projects: [https://github.com/mirage/mirage-www/wiki/Pioneer- Projects](https://github.com/mirage/mirage-www/wiki/Pioneer-Projects)

</comment></comment><comment><USER43> I really wish they'd taken the pipeline (|>) operator from F#, if they were going to rework OCaml.

<comment><USER44> As others have noted, the pipeline operator already exists in OCaml. And even if it didn't, you can define it pretty easily:

        let (|>) x f = f x

<comment><USER7> Can be shortened to

        let (|>) x f = "%apply"

which utilises some language magic and is probably faster.

<comment><USER44> At risk of being pedantic, that's actually shorter. It also doesn't work, at least on the version of OCaml I'm familiar with. In order to invoke that particular bit of "language magic", you'd have to declare it external and explicitly give its type:

        external (|>) : 'a -> ('a -> 'b) -> 'b = "%revapply"

Also, `%apply` is usually the `@@` operator. For `|>`, one would expect `%revapply`.

</comment></comment></comment></comment><comment><USER45> I'm seeing "BUILD SYSTEMS RAPIDL" over here on Linux.

<comment><USER4> Thanks there's some strange font rendering issues. Will fix! edit: now fixed.

</comment></comment><comment><USER46> I took ocaml for a spin a couple months ago and compared to more recently created languages it seems a bit crufty.

If they can simplify the build system to be on par with something like cargo that would be swell.

Also: having rust style traits or haskell classes would be amazing. Also macros that aren't obscure and hard to use compiler plugins please :)

Hopefully it ends up being more than just questionable sugar around ocaml and actually adds some sorely needed language features.

<comment> nv-vn Try out the OASIS build system. It's very similar to Cargo/Cabal (although it's separate from the package manager) in that you basically declare what you're working with and it does all the building for you. It's super simple to use and is good enough for 95% of use cases. As for traits/type classes, this is in development with the modular-implicits (experimental) fork of the compiler. It's highly likely that some form of this will make it into the language soon, but for now you can already start playing around with it if you want. It's super cool because it uses the module system to express type classes/traits rather than adding more parts to the language.

<comment><USER47> I tried it. I found no easy way to have dependencies isolated per project. Any suggestions?

</comment></comment></comment><comment><USER48> What problems would be well solved by Reason/OCaml?

<comment><USER4> For now:

\- Teaching new programmers how to use ML, and OCaml in particular.

\- Keeping consistent formatting rules among a large team or project and automating that within your editor.

\- Benefiting from the comprehensive pattern matching checks provided by the OCaml compiler.

\- Benefiting from faster compile times of `ocamlc`, or faster native execution time of `ocamlopt`.

\- Benefiting from Merlin, and the new version of Merlin with support for Reason - I cannot overstate how important Merlin is to my daily development.

Soon:

\- Having conventions for forming namespaces within packages.

\- Making it easier to share and connect many small packages into a a larger application, and develop those packages locally.

\- Having "just works" support for the REPL, so that it's one fast command to start the REPL with all your dependencies loaded and autocomplete would just work.

\- Having a "just works" debugger loader that maps all of your source files and compiled artifacts so you can instantly start debugging your app.

<comment><USER49> Interesting project. Ever since being exposed to a bit of Standard ML (which never had much of a "real-world" standard library, as far as I could figure out), I always _wanted_ to like OCaml, but couldn't quite get over the odd syntax.

It's been a while, but taking a look at this comparison of SML and OCaml again:

[http://www.mpi-sws.org/~rossberg/sml-vs-ocaml.html](http://www.mpi- sws.org/~rossberg/sml-vs-ocaml.html)

It feels a bit like you've landed in some strange neither-or space for Reason? I'm not sure if it would make sense to bend OCaml into being a subset of SML or not (I know there are some differences, just not sure how much those require different syntax, or if they do) - but did you consider moving more toward SML?

I can see the reasoning between going from <> to != and <\- to = (there are more programming languages, and more programmers now, than ever before, and whatever the merits of using = for comparison, almost all other languages in common use now have it as an assignment operator (even if it is still a source of bugs a la: "if(a=0) ...")).

It's exiting times with Elixir and Lisp Flavoured Erlang for Erlang, and now Reason for OCaml (and to some extent various dialects, languages and DSLs for Javascript, like typescript, coffee script and JSX for React).

<comment><USER4> > other languages in common use now have it as an assignment operator (even if > it is still a source of bugs a la: "if(a=0) ...")).

Which with OCaml, is not an issue thanks to the decent type system!

I agree with you - there is something to be said for just not going against the grain where you can tolerate it. I ask myself, "Are semicolons really the hill I want to die on?".

</comment></comment></comment></comment><comment><USER50> Would be nice to see modular implicits like those that are being proposed for OCaml. It's a shame to not have any form of ad-hoc polymorphism.

<comment><USER4> What cheng said, but we could also make sure that the syntax for modular implicits plays very nicely with the rest of the grammar. With Reason we can rethink the grammar holistically instead of having to find room in it for new features. The hard part is in the actualy implementation of Modular Implicits, but that's currently being handled by skilled professionals and Reason will be able to use them.

<comment><USER50> Ah, woops - didn't realise that Reason was such a thin syntactic layer over the semantics of OCaml. That approach makes sense then.

<comment><USER4> Yes, I'd describe it as being "non-invasive". It means we get the benefit of literally every feature implemented in the core of the language (multicore, F-lambda, modular implicits, ppx attributes), but can decouple the process of deliberating over how this is presented to the user, and (not to beat a dead horse) but we don't even have to worry about getting it right on the first try! Now that I've embraced this as the new "normal" way, I couldn't imagine having to design a syntax and stress over having to determining the exact _permanent_ concrete syntax that needs to live _virtually forever_ without knowing which other language features will be added later.

</comment></comment></comment></comment><comment><USER51> Has anyone here built something say, over 10k lines in Ocaml? How is the development experience? IDEs, debuggers, linters, deployment, etc.

<comment><USER7> I was working on a 30kloc compiler written in OCaml:

\- No IDE, I was happily using Vim but many of my coworkers were using Emacs. What helped a lot was Merlin, so I could print the types of the identifiers. This was much more useful than any REPL or IDE I have ever used.

\- Debuggers: didn't use much, ocamldebug was an okay experience at best

\- Linters: did not use. Most of the LOC were simple enough to just be obvious.

\- Deployment: it was a Makefile which took about a minute to build the compiler from scratch. I guess that by using a proper OCaml build system we could've sped things up by requiring less recompilation but it was fine. In the end a binary fell out and could be used however.

I liked the development experience a lot, once it compiled it was reasonably clear that it would work as expected, expanding the compiler was very nice since every time I added a new variant, the compiler complained where I need to add code and then it just worked. We had the advantage that we already had our own mini standard library, so most missing utility functions were already in place when I joined.

<comment><USER52> > \- Linters: did not use. Most of the LOC were simple enough to just be > obvious.

I imagine an hlint like linter might be useful, and could give you information about common programming patterns. (Ie hlint tells you when you could be using foldr instead of an explicit recursion.)

</comment></comment></comment><comment><USER53> Interesting but since they are designing a revised syntax, I wish they had got rid of Ocaml's semi colon. These stand out in 2016.

<comment><USER4> See the FAQ, as this is a fairly anticipated question. There's some benefits to having _some_ token to separate let bindings and statements, so that the grammar is unambiguous, and it doesn't matter too much which token is used (monkey emoji anyone?) However, I think it may be possible to eliminate delimiters altogether eventually. Because we have the `refmt` program which can convert and beautify between two arbitrary versions of the syntax, we'll be able to automatically upgrade your code if we do find a way to eliminate delimiters unambiguously. Stay tuned.

<comment><USER54> It would be good to look at the F# spec for a description of their existing indentation & semicolon elision rules. In practice I've found them nice to work with, although they sometimes require excessive indentation.

<comment><USER4> Thanks evincarofautumn! I'll take a look.

</comment></comment></comment></comment><comment><USER55> > A new, developer experience for rapidly building fast, safe systems.

The comma placement suggests that developer is an adjective for experience.

<comment><USER4> Fixed, thank you @konschubert.

</comment></comment><comment><USER56> Do it provide a usable standard lib? If so, I may try to use it in side project.

<comment><USER42> There is the small standard library that ships with the compiler. And then there are more extensive ones such as Batteries and Core. It is easy to generate docs in Reason syntax from OCaml projects using `redoc` tool. Here is Reason docs for:

\- OCaml compiler's stdlib: [http://kcsrk.info/reason_stdlib_docs/index.html](http://kcsrk.info/reason_stdlib_docs/index.html)

\- Batteries: [http://kcsrk.info/reason_batteries_docs/index.html](http://kcsrk.info/reason_batteries_docs/index.html)

</comment></comment><comment><USER57> So, I know OCaml is impressively fast. And, I know OCaml is impressively terse ("concise" may be a more positive term). But, I wonder what would make one choose OCaml (or a variant of it like this) over some of the other new or old languages that exhibit some excellent characteristics for modern systems. In particular, a convincing concurrency story seems mandatory. I don't know enough to know if OCaml (or this variant) has a convincing concurrency story, and nothing on the front page of website tells me.

So, why do I want to learn this, rather than, say, Go or Elixir?

<comment><USER58> Because ocaml type system is state of the art unlike go or elixir.

Also, what's a convincing concurrency story? Does multiprogramming count?

<comment><USER13> A convincing concurrency story is the one offered by the two languages you mentioned: Go (with memory sharing, which is an advantage or a drawback depending on your goals), and Elixir (no memory sharing between lightweight processes).

A version of OCaml offering a similar "concurrency story" would have a lot of appeal.

<comment><USER58> Those are just techniques, other techniques achieve the same goal, such as multiprogramming, which I think is better that's why I asked.

But if you want POSIX threads and lightweight threads for the sake of it, then there are several lightweight threads libraries for ocaml (LWT being the most common one). POSIX threads you have to do from C though.

</comment></comment></comment></comment><comment><USER59> As excited as I was to see a big new thing in OCaml-land, I have to say my excitement died down as I read on.

I don't really see most of the changes as improvements.

Having a different, explicitly-noticeable syntax for mutable updates is nice, because it calls out mutability (which should be used sparingly).

I don't see extra braces as necessarily an improvement, given that OCaml's local scopes are already quite unambiguous thanks to "let ... in". On that note, Removing "in" and just going with semicolons removes another "smelly- code-callout" by making it less obvious what's imperative and what's functional.

I actually _don 't_ like ambiguity between type annotation and value assignment in my records. It's clear in current OCaml that {a: int} is a type declaration and {a = 1} is a value declaration/assignment. Moving to colons- for-record-values is at best a bikesheddy, backwards-incompatible change for change's sake, and at worst a breaking-change way of code less clear.

Speaking of making code less clear, how is "int list list" not clear? It's an int-list list. As in, a list of int-lists. So of course it should parse as "(int list) list". Why change to backwards annotations? Just to prevent existing code from working as-is, and making people used to reading ML spend extra brain cycles on remembering that your types read the opposite way?

And they make a _huge_ deal out of their type for tuples being "(a, b)" instead of "(a * b)". Yeah, okay, I get it. It's not _that_ big a deal, since people are used to reading product types as, well, products.

The other thing that seems weird to me is the need to change to a "fat arrow" instead of a "skinny arrow", again for no real reason. In fact, it just makes it more likely that you'll confuse it with a comparison operator. Nobody tries to type ">-", but people try to type ">=" all the time. You're just switching for the sake of switching, and it's not an improvement.

Their example code of their replacement for match...with is especially egregious. If you showed me the OCaml snippet and the Reason snippet unlabelled, I would think that the OCaml snippet is the new-and-improved version, since it's much more compact, much less noisy, and reads more like what it's trying to do ("match my_variable with either SomeValue x or SomeOtherValue y").

Another thing they make a lot of noise about is requiring fewer parens in some places. But then, they also require more parens in other places. So...okay? I guess? Not really a win.

And why rename equality operators? Are you really going to tell me that people _prefer_ that their languages have "==="?

<comment><USER60> Yeah, I kinda feel like this whole project is pointless. As many warts as OCaml's syntax has, for the most part I actually like it.

It seems like Reason is solving a non-problem. When I first went to the webpage, and saw "Build Systems Rapidly", I thought maybe it was a new build system for OCaml. I was hoping it would be a Cargo-style build system/package manager for OCaml.

<comment><USER4> "As many warts as OCaml's syntax has, for the most part I actually like it."

This is for those people who do not like OCaml because of those warts. If you are one who is already sold on OCaml, it's very easy to forget how many there really are.

Regarding "Build Systems Rapidly": Please hang in there and stay tuned. The syntax is there to help people learn ML rapidly. The Merlin integration and syntax formatting tooling is there to help people become productive rapidly inside their editors. Next, we have specified a workflow for actually building systems rapidly (as in compiling large projects with namespacing rules).

Instead of our previous approach where we just drop a more polished project with many of the goals accomplished, this kind of project benefits from expertise that is distributed across the entire industry and for that, it's better to be open earlier. I hope you can appreciate and encourage this kind of openness.

<comment><USER52> I'm looking forward to having an OCaml version that looks more like Haskell. :)

<comment><USER4> To start, we have "fixed" type parameter application syntax. (Most people see this as a win and now matches Haskell IIRC). Some have requested ability for type annotation ayntax to be above the value it annotates.

<comment><USER52> By the way, do you even need to work towards _one_ better syntax? Seems like you should be able to support mostly whatever syntax the user wants? (Within reason.)

</comment></comment></comment></comment></comment></comment><comment><USER61> It would be nice if they'll make it work on Windows platforms. There is already an issue for that[1]. It also depends from the Windows support in OCaml itself and opam[2].

[1] [https://github.com/facebook/reason/issues/470](https://github.com/facebook/reason/issues/470)

[2] [https://github.com/ocaml/opam/issues/2191](https://github.com/ocaml/opam/issues/2191)

<comment><USER61> There is some work is done for opam [https://github.com/dra27/opam/commits/windows](https://github.com/dra27/opam/commits/windows)

</comment></comment><comment><USER62> Wondering how, or even if, this compares to elm? [http://elm- lang.org/](http://elm-lang.org/)

</comment><comment><USER63> This is the new low of search engine unfriendly :-(

<comment><USER52> Just look for "Reason OCaml".

</comment></comment><comment><USER64> Reason looks interesting. I have had a 5 year run of alternating between really liking Haskell, and sometime thinking that my own development process was too slow using Haskell. I am putting Reason on my try-it list.

Documentation suggestion: add examples for string manipulation.

</comment><comment><USER65> I miss dead code elimination the most, especially when building code that uses Core.

<comment><USER35> It's coming with flambda. Am I wrong?

<comment><USER65> Not that I'm aware of.

Edit: flambda has been released in 4.03 and I'm using it but utop is 17MB, so I doubt proper dead code elimination is part of flambda.

<comment><USER35> Sorry, what I meant is that I remember having read somewhere that dead code elimination, or some sort of, will be one of the optimization coming in the future due to the introduction of flambda. When I go back home I will try to find a reference, I might recall wrongly

<comment><USER65> You're probably right that it was mentioned on Jane Street's blog that flambda will enable such optimizations. I recall one of the ocamlc devs saying that real dead code elimination is planned but not available yet.

</comment></comment></comment></comment></comment><comment><USER66> Is Facebook using mirage or similar ocaml unikernel tool chain? Is part of the goal of reason to make a more approachable syntax available for authoring code that will run inside next-generation containers?

<comment> nv-vn From what I can gather, it should work independently from the Mirage toolchain, but will remain compatible with all current OCaml tooling, so using Mirage tools will work as well.

</comment></comment><comment><USER67> Does anyone Else's Firefox absolutely slow to a crawl on this page?

Edit: just doesn't load at all on Edge. Does load in Chrome/Opera and surprisingly IE 12 but doesn't load the logo's font.

</comment><comment><USER15> i noticed this in the examples:

        | List p (List p2 (List p3 rest)) => false  /* 3+ */

has the regular list destructuring in pattern match syntax been removed? that's pretty sad, if so - lists _are_ the default data structure in ocaml, and it's worth retaining some special syntax for cons especially in pattern matches.

<comment><USER23> For me the odd bit is that they called the constructor List instead of Cons.

<comment><USER4> Thanks for the feedback. We can change it to `Cons`, but I was assuming that anyone who knew what `Cons` was, would know what `List` meant, but not everyone who understood what `List` meant, would know/recall what `Cons` meant.

</comment></comment></comment><comment><USER68> Can we please keep using parens for function invocation? Leaving them out hurts readability.

<comment><USER50> The difference between curried langs like OCaml and Haskell and languages like Ruby and Elixir are that the leaving out of parens actually _means_ something, ie. all functions take one argument. If you wanted parens whilst maintaining the same semantics, you would end up having to do write: `add(2)(3)`

<comment><USER68> Indeed, but leaving out the parens makes more work for humans. What does `a b c` mean? `a(b)(c)`? `a(b(c))`? If the only thing that is gained by leaving out the parens is brevity, I don't think its worth it.

<comment><USER54> It's no different than having to know the associativity of an operator. Does "a - b - c" mean "(a - b) - c" or "a - (b - c)"? The former, for no reason other than a long history of convention. Same goes for function application. And you could make the same argument about languages that require parentheses for function calls: what does "a(b)(c)" mean? "(a(b))(c)" or "a((b)(c))"?

What's gained is that the syntax mirrors the semantics. If you have a function "f : int -> bool -> int", then "f 5" has type "bool -> int" and "f 5 true" has type "int". It's not like in Forth where you can't tell from the syntax how many arguments a function takes.

That said, I do think right-associative function application may be more intuitive—I like having it in Perl, for example.

<comment><USER52> You get right-associative function application (in Haskell) by putting $ in between your functions.

(And if you are using composition instead, it associates in both directions.)

</comment></comment></comment></comment></comment><comment><USER69> Is there an overview in which regard this differs from "classical" Ocaml?

</comment><comment><USER70> if this had come out five years ago i'd probably be all over it, but i think i'd rather just use rust at this point. different syntax but better safety and it's not like the ocaml ecosystem has a lot to offer

</comment><comment><USER71> Everything reads like double talk. Not sure what I would want to use this for.

</comment><comment><USER72> Pretty disappointed that they'd release something that butchers Firefox.

</comment><comment><USER73> Fry Firefox RAPID.

</comment><comment><USER74> BUILD SYSTEMS RAPID

</comment><comment><USER75> Why rtop?

<comment><USER44> It's just OCaml's repl with the parser replaced. OCaml's repl is called utop. It stands for Universal TOPlevel.

</comment></comment><comment><USER76> This page is completely unusable due to lag. From the other comments it seems this is FF specific. One would think FB would have the resources to test new pages at least on common browsers before publishing.

Edit: The fix came quickly though.

<comment><USER4> Thanks, we're looking into how to fix the perf in FF. Meanwhile, it works on my tiny mobile cell phone.

<comment><USER77> Disabling the box shadow on .content-root fixes the performance bug (FF46.0).

<comment><USER4> We just discovered the same by disabling the media query which handles the shadow. Thank you very much for investigating.

<comment><USER78> Seems to work fine on FF (46) now, thanks.

</comment></comment></comment></comment></comment><comment><USER79> Facebook just won't let OCaml die.

<comment><USER75> Neither will Jane Street.

<comment><USER79> What is Jane Street's yearly profit?

<comment><USER75> You tell me.

</comment></comment></comment></comment><comment><USER80> Another site that is useless with JS disabled. Nice work.

</comment><comment><USER81> I wonder if the people at Propellerheads will sue Facebook for using the name of their software [https://www.propellerheads.se/reason](https://www.propellerheads.se/reason)

</comment><comment><USER82> It seems to me that Rust would be pretty much strictly better than this.

In particular Rust has similar syntax, seems to have all Reason's features plus the linear types and regions/borrowing that allow memory and concurrency safety while still being able to mutate memory and not being forced to use GC.

They are aware of Rust since they cite it in their page, so I wonder why they decided to create this instead of using Rust.

It would be nice if they explained this in the FAQ.

I guess it might be useful if you have an OCaml codebase to interface with but don't already know OCaml, but given the relative obscurity of OCaml that seems a pretty narrow use (and also Facebook isn't known to make extensive use of it, afaik).

<comment><USER83> Both garbage collected languages and rust offer memory safety, rust just trades better performance for a more complicated borrow system.

Use rust when you need the performance. Use a GC'd language like reason when you want less things to reason about.

<comment><USER60> > rust just trades better performance for a more complicated borrow system.

I would say Rust trades more predictable performance for a more complicated borrow system.

<comment><USER84> Rust's borrow system is actually not the key part; if it were just that, then yes, it would be purely a complication performance would be the only important part about it when comparing it with garbage collection. No: the key part is the ownership model, that an object is owned in precisely one location. Borrowing sits on top of and fits into that, not the other way round.

The ownership model is the part that I don't myself yearning for in other languages I work in such as Python and JavaScript.</comment></comment></comment></comment>


Statement by Edward Snowden to human rights groups at Sheremetyevo airport - <AUTHOR> http://wikileaks.org/Statement-by-Edward-Snowden-to.html <comment> brown9-2 _These nations, including Russia, Venezuela, Bolivia, Nicaragua, and Ecuador have my gratitude and respect for being the first to stand against human rights violations carried out by the powerful rather than the powerless._

Are people really not bothered at the irony in this sentence? Russia, as a country that stands against abuse of the powerless by the powerful?

[http://www.nytimes.com/2013/07/12/world/europe/russian- court...](http://www.nytimes.com/2013/07/12/world/europe/russian-court- convicts-a-kremlin-critic-posthumously.html?pagewanted=all)

 _If the posthumous prosecution of Sergei L. Magnitsky, the lawyer who was jailed as he tried to expose a huge government tax fraud and died four years ago in a Russian prison after being denied proper medical care, seemed surreal from the moment the authorities announced it, the verdict and sentencing on Thursday did not disappoint.

By all accounts, it was Russia's first trial of a dead man, and in the tiny third-floor courtroom of the Tverskoi District Court, it took the judge, Igor B. Alisov, more than an hour and a half to read his decision pronouncing Mr. Magnitsky guilty of tax evasion._

It doesn't matter if it is hypocritical of an American like me to point this out, when it goes on in my country/government as well - but I find it willfully ignorant to label the Russian government as a defender of human rights like this.

edit: here is some more reading on Russia and this topic: [http://www.hrw.org/news/2013/04/24/russia-worst-human- rights...](http://www.hrw.org/news/2013/04/24/russia-worst-human-rights- climate-post-soviet-era)

<comment><USER2> > Are people really not bothered at the irony in this sentence? Russia, as a > country that stands against abuse of the powerless by the powerful?

I'm more bothered by _your_ sentence. Russia and China are undoubtedly worse offenders than the US when it comes to human rights (well, at least historically, in this day and age the US seems to be racing to catch up). However, this alone is never a valid reason to discount their criticisms of US actions.

I know you're referring to Snowden's inclusion of Russia on that list, but in this case, they (and maybe China) are the only ones who can stand up against America. Clearly Ecuador fell with a single phone call.

I don't think it's hypocritical for you to point this out, but it simply should not detract from the rest of his statement. Russia has not handed him over---the least he can do is not bite the hand shielding him. I, for one, am glad that people aren't bothered by it.

<comment><USER3> You've got to see the irony in taking asylum in a country where the kinds of spying he blew the whistle on in the first place are brazenly displayed on public television:

[http://boingboing.net/2013/07/08/snowden-and-venezuela-my- bi...](http://boingboing.net/2013/07/08/snowden-and-venezuela-my-biza.html)

<comment><USER2> I totally agree that it is ironic. I just don't think it should detract from his main point, and personally, I'm bothered by how many people are trying to shift the focus to that. In the beginning, Snowden stated he didn't want the news to be focused on him (see how that's turned out) but instead focus on the NSA. I'm sure he wants it to be focused on Russia's human rights abuses even less (there's plenty of coverage on that independent of him).

<comment><USER4> Agreed. Tu quoque is really prevalent in this thread.

<comment><USER5> Actually, no it's not. Compare to a thread about Assange. Snowden's revelations are apparently really hard to ignore.

</comment></comment></comment></comment></comment></comment><comment><USER6> It's very odd both that the US government would use Human Rights Watch to convey messages (which are essentially threats or warnings) to Mr. Snowden, and that Human Rights Watch would feel the need to agree to convey messages of that nature on behalf of the state apparatus that is targeting Mr. Snowden.

It was also odd when I earlier read that Human Rights Watch was the only agency which received an invitation from Mr. Snowden which felt the need to release the message in advance to the media, including the time and place of the meeting.

To see the problem with these events, consider it in any other situation where a political prisoner who is in hiding, let's say a North Korean, is meeting with representatives from human rights agencies. How would it be perceived if one of those human rights agencies announced the location in advance and took the opportunity to deliver a personal threatening message they had privately received during a personal conversation with Kim Jong-un.

<comment><USER7>
         consider it in any other situation where a political prisoner who is in hiding

_Mr. Correa has pointed to the case of two brothers, William and Roberto Isaias, who ran a bank at the center of a huge Ecuadorean financial scandal in the 1990s. They were convicted in absentia of financial wrongdoing in an Ecuadorean court. They now live in the United States, but repeated requests for extradition have been unsuccessful.

And Venezuela has demanded the extradition of Luis Posada Carriles, a former C.I.A. operative accused here of masterminding the bombing of a Cuban airliner that killed 73 people in the 1970s. He escaped from a Venezuelan prison in the 1980s and went to live in the United States.

"The first thing you need to do to have the moral standing to ask for the extradition of this youth Snowden, whose only act is to reveal the crimes that you committed, is to turn over Luis Posada Carriles, who you are protecting," Mr. Maduro said this month. _

</comment></comment><comment><USER8> The US Govt illegal activity couldn't have been exposed by a nicer guy. He's self-less and motivated by altruistic goals that serves everyone's interest but the US Govt's (and other Govt's they can influence).

It certainly helps our cause that he's both intelligent and articulate.

The fact that the US Govt can continue operating at full will irrespective of legal and constitutional boundaries shows just how much power and influence they already have.

<comment><USER9> It is now the government that is terrorizing the populace by displaying such a common disregard for laws it is enforcing. That is an act of an illegitimate government that uses illegal and immoral tactics to control general populace.

</comment></comment><comment><USER10> Whomever is speech writing these statements (or editing them) is doing a great job. Not only does Snowden make the US out to be a corrupt and despotic nation, willing to subvert its own laws and principles to shut one person up, it manages to position the US' character below that of countries run by South American dictators and ex-KGB colonels.

It is my sincere hope that this event ends the political careers of a number of US politicians, and engages enough voters to disrupt the status quo.

<comment><USER11> So, ex-KGB automatically means you were born to be an evil sadist? Amazing.

<comment><USER10> Is that what it means? I keep wondering why the news services keep bringing it up.

<comment><USER11> Yes. Also anything Russian means totalitarian, oppressed, wrong, bad, Rambo, Vodka, Bears, etc. As a recently naturalized US Citizen I can not begin to describe how much better and dualistically simple everything looks though the RedWhite&Blue glasses.

<comment><USER12> Rambo was Russian?!

<comment><USER11> no, he just like the mow them down

</comment></comment></comment></comment></comment></comment><comment><USER13> Not only is Snowden brave, and smart enough to outwit (so far) the most powerful institutions of our day, he's also an excellent writer.

To David Brooks and all the others who mock him for not finishing high school, take this statement as a model of clarity and forthrightness.

<comment><USER14> If you think he wrote this on his own, then you're naive.

I'm not challenging the intellectual capacity of Snowden, but there is an army of supporters, including a well known publicist, that have been trying to turn Snowden into the latest cause celebre.

<comment><USER15> You think the presidents write their State of the Union speeches on their own? It's only fair that the country that has a literal army of supporters, speechwriters, publicists, and lawyers, is matched by at least one well-known publicist.

</comment></comment></comment><comment><USER16> Anyone asking him to come back and face trial under the current conditions is either naïve or a fool. However, I think that he should at least put conditions on the table under which he would return to the US to face trial.

The most important condition would be strict adherence to the 8th amendment, which means no possibility of solitary confinement or other cruel and unusual punishment and reasonable bail, so he is afforded the same rights that Daniel Ellsberg was after leaking the Pentagon papers.

The other required condition would be changing the jurisdiction in which charges are brought back to where they should have been filed, which is Hawaii, _not_ Virginia. Cherry-picking a jurisdiction where many of those that will be on the jury may work in the IC community or have close ties to the IC community is not justice. In fact, it is a perversion of it.

Lastly, (and I know this would never happen), but I would love to see a Frost v. Nixon type debate involving Glenn Greenwald, Edward Snowden, Barack Obama, Gen. Keith Alexander and James Clapper live on national TV unrehearsed.

<comment><USER5> You're falling into the trap that you're calling out other people for falling into.

> _The most important condition would be strict adherence to the 8th > amendment_

This is supposed to be a condition of USG existing in the first place, so the only thing it could give is more empty promises.

> _In fact, it is a perversion of it [justice]_

Once again, if USG was bound by anything, it would already not be perverting justice in every other trial.

At this point to Snowden, USG is just an angry beast to be avoided at all costs. More power to him for working to unmask the extent of its colonization of the world while he's still in limbo. But at this point, he can never return to the soft prison with free speech, and has to deal with being in the rest of the world without it. The only thing we can wish for _him_ is to be able to resume a nice life next to a beach somewhere.

</comment></comment><comment><USER17> _The Human Rights Watch representative...had received a call from the US Ambassador to Russia, who asked her to relay to Mr Snowden that the US Government does not categorise Mr Snowden as a whistleblower and that he has broken United States law._

That's just...hilarious, and absurd. What purpose does that call serve; what goal is it working toward? Is it some sort of legal requirement? Can we just do without the inane posturing, for once?

Edit: apparently there is some dispute as to whether this conversation actually took place.

</comment><comment><USER18> Thank you Edward Snowden. You are a true hero.

</comment><comment><USER19> I would have a lot more regard for what Snowden is claiming about United States government actions if he would come back here to the United States and stand trial. More and more of what is being said in his statements to the press (which plainly are receiving editing help, at least, from Wikileaks) are not making sense in the overall context of how different countries behave in the community of nations.

When all the smoke is cleared away from Snowden's allegations, and there have been congressional investigations into the data-gathering and surveillance practices of United States government agencies and private companies, most Americans will still be quite supportive of their federal government (in the usual complaining United States way) and tens of millions of people around the world will still desire to settle in the United States.

[http://www.gallup.com/poll/161435/100-million-worldwide- drea...](http://www.gallup.com/poll/161435/100-million-worldwide-dream- life.aspx)

To date, I am persuaded that United States government programs related to foreign intelligence need more effective oversight--not least because they hire snafus like Snowden. I am also persuaded that most countries with governments subject to the discipline of a free press and free and fair elections largely are willing to cooperate with the United States in the kind of programs the NSA intends to run, because there are genuine threats from terrorist plotters in those countries.

[https://www.google.com/search?q=Boston+Marathon+bombing&sour...](https://www.google.com/search?q=Boston+Marathon+bombing&source=univ&tbm=nws)

I'd be glad to see NSA programs reviewed by Congress, and possibly curtailed in their operation to ensure their lawfulness. I'd also be glad to see Edward Snowden go on trial according to United States law to weigh his actions against any defenses he may be able to assert at trial. I've lived elsewhere twice for long stays in my adult life, and after talking to people from around the world about this, I'm still glad to be living in the United States at the moment, and still mostly glad that the United States system of rule by law operates as it does.

<comment><USER20> >I would have a lot more regard for what Snowden is claiming about United States government actions if he would come back here to the United States and stand trial.

Khalid Sheikh Mohammed was waterboarded 180 times, i guess Snowden feels that even a couple times of such simulated death experience would be too much - look at how Manning looks - like a ghost (and i suppose Manning had it clearly explained to him that if he mentions anything else that was done to him beyond solitary confinement - it will be repeated in double amount)

note: while there is incomparable difference between Khalid Sheikh Mohammed's actions and Snowden's, there isn't much difference from the POV of the ones who have and would be "handling" the former and the latter - between terrorism and high treason, high treason have been punished by the powers to be equally or even more harsher.

<comment><USER21> How nice is it that we can casually talk about an American citizen fearing being repeatedly tortured by his own government?

<comment><USER22> And yet it's as inaccurate as casual talk that Obama will soon bring the dark Witch's armies from Narnia to terrorize the populace.

Did Thomas Drake end up being waterboarded?

<comment><USER21> But that's not the point at all. Would it be legal for the military to waterboard Bradley Manning? I have no idea. Twenty years ago, the answer would be clearly "no".

</comment></comment></comment></comment></comment><comment><USER23> Hmm, what he said about the grounded plane made me wonder: What if he (or a supporter) falsely tipped off US authorities that he was on that plane to see whether he could travel to South America securely, or if the US would somehow intercept the plane?

A dry run, as it were.

<comment><USER24> I thought the same thing about the plane that flew from Russia to Cuba yesterday, skirting US airspace.

<comment><USER25> More likely a commercial concern. The airline would incur a tremendous cost if its flight were grounded by US authorities and its customers are probably expressing worry about that possibility. They changed their route to assuage these fears.

<comment><USER26> Is there any question whether the USA military would have stopped the plane if they had really believed Snowden was on it? Why would they care more about international law than the Fourth Amendment?

</comment></comment></comment></comment><comment><USER27> Now hopefully Russia will do the right thing and at least let him leave the damn airport. There are a number of routes from Russia to Venezuela that don't cross over Western European or US airspace -- can't VZ just send a private plane with a military escort over there and bring him back?

<comment><USER28> It's not Russia that doesn't let him leave the airport, it's the US by revoking his passport in a clear violation of human rights.

No country on the planet can just let him pass the border without violating it's own laws. This is exactly why revoking his passport is such a disgusting move that violates all common decency.

If there was ever one specific moment in history in which the US changed from a flawed democracy to a totalitarian state, it's the moment they took Snowden's passport.

<comment><USER29> Snowden doesn't need a passport to leave Russia or enter Venezuela if he claims refugee status and requests asylum. The 1951 Refugee Convention allows a person seeking refuge to travel without a passport due to the possibility that the asylum seeker could be persecuted if identified by a document they're carrying. E.g. If your name is John Smith and your country is killing everyone named John Smith, you may not want to carry your passport with you.

</comment></comment></comment><comment><USER30> > The Human Rights Watch representative used this opportunity to tell Mr > Snowden that on her way to the airport she had received a call from the US > Ambassador to Russia, who asked her to relay to Mr Snowden that the US > Government does not categorise Mr Snowden as a whistleblower and that he has > broken United States law.

Am I the only one who found this whole statement pretty odd?

Let's see. A "whistleblower" is a term for someone who blows a whistle. This is generally meant to indicate someone who is making some kind of loud noise to report a crime; someone (maybe a cop, maybe just someone who is a victim of a crime) trying to get attention that a crime has been committed.

Now, when reporting a crime, do you generally expect the perpetrator of that crime to be the appropriate person to determine whether or not a crime has been committed, and thus whether or not labeling the person a "whistleblower" is appropriate?

The whole idea of whistleblower laws that don't protect someone from reporting to the public about crimes committed by the administration is laughable. What the hell is the point of any kind of whistleblower laws or protection if you can't actually blow the whistle on your bosses?

<comment><USER31> But the whole idea of government is that one group of individuals should be the "top level" of authority, creating, enforcing, and interpreting its own laws, reserving the authority to keep certain types of secrets (and, of course, reserving the authority to determine which types of secrets qualify), etc.

<comment><USER30> Um, no. The whole idea of democracy is that there is no "top level" of authority.

In the US system, there are representatives of the people, passing laws. There is a single executive, also a representative of the people, implementing said laws. And there are the courts, interpreting said laws when there are disagreements over them.

But the whole point of representative democracy is that the people ultimately get to decide who is doing this, so that a runaway government cannot be a single "top level" of authority that creates, enforces, and interprets its own laws. The whole point is that the people are the highest authority, and the government serves at their will.

But if the government hides substantial information from the people, a democracy cannot effectively function. The people need to know what the government is doing. There are good reasons for limited amounts of secrecy, for particularly sensitive information or for privacy purposes. But keeping vast amounts of information on things that affect everyone, outside of a wartime environment, is anti-democratic.

This type of secrecy, this type of executive action which is seen as being unquestionable by even elected representatives, let alone the people, is turning the government from a representative democracy to an oligarchy.

<comment><USER31> > The whole idea of democracy is that there is no "top level" of authority.

Not true in any practical sense. If the government physically does something to me (like surveils me, arrests me, evicts me, etc.) I don't get to vote my way out of it. They are the top level of authority in any meaningful sense.

<comment><USER30> You appear to be confusing individual authority with collective authority. Of course you, personally, cannot get out of being arrested; if anyone could get out of being arrested by voting or saying that they are a member of the populace and thus are the ultimate authority, that would be pretty silly.

But rather, the people, collectively, are supposed to be the top level of authority. If the people want to vote out the current administration, they can. If they want to change the laws, they can vote for representatives who will do so. If they want to change the constitution, they can call a constitutional convention. Now sure, no individual can do this alone; they have to get a substantial fraction of the populace to do it along with them.

However, there are several factors that work against this. One major one is secrecy. If what the government is doing is hidden, then they cannot provide oversight (nor can their elected representatives, or the courts).

</comment></comment></comment></comment></comment><comment><USER32> I regularly read reader comments on NYTimes regarding NSA/Snowden affair, and this is the first time that vast majority of highest-rated comments there are negative toward Snowden. Previously, the majority was overwhelmingly pro- Snowden. Very curious. [http://www.nytimes.com/2013/07/13/world/europe/snowden- russi...](http://www.nytimes.com/2013/07/13/world/europe/snowden-russia- asylum.html?ref=global-home)

<comment><USER16> Possible HB Gary Sockpuppets?

<comment><USER33> yes, anyone who disagrees with you is just a puppet!

</comment></comment></comment><comment><USER34> In all seriousness, is there even a single HN commenter who doesn't support/worship this guy? Is the diversity of thought that nonexistent on this subject? I'm just sorta curious and ask the question sincerely.

<comment><USER35> I don't support him. I think it's wildly hypocritical of him to run to China and Russia because he's so opposed to government spying. I also think that the NSA spying is less troubling that the other numerous abuses of the Obama administration, including using the IRS to repress political speech.

<comment><USER34> Phew - I agree. Just making sure I'm not completely insane here, and frankly the hero worship of him is really starting to creep me out. I worry that too many people blindly see this as getting back at THE MAN without giving enough consideration to many other aspects of the ordeal.

I think his actions while on the run are just pathetic. He's such a weasel, like a guy who sucker punches someone on the street then takes off. The to align himself with these other countries who in the grand scheme of things are far worse actors than the US takes some serious balls. I still get the sense that 90% of the reason he decided to pull this off was for selfish reasons, that he wanted the notoriety.

EDIT - I suspect numerous downvotes will confirm the consensus

<comment><USER36> How are those countries "far worse actors" except for you not living in one of them and therefore having a significant bias? Did any of these countries invade a country as big as Iraq based on plain manipulations? Can any country come even near in the number of dictators it supported?

Just as a minuscule example of US foreign policies, have you ever heard about this:

[http://en.wikipedia.org/wiki/1953_Iranian_coup_d'état](http://en.wikipedia.org/wiki/1953_Iranian_coup_d'état)

Or use of, practically, chemical weapons:

[http://en.wikipedia.org/wiki/Agent_Orange](http://en.wikipedia.org/wiki/Agent_Orange)

Or something current:

[http://www.foreignpolicy.com/articles/2013/06/11/to_protect_...](http://www.foreignpolicy.com/articles/2013/06/11/to_protect_and_defend_obama_constitution)

"Now in his second term, President Obama insists that his counterterrorism policies differ markedly from Bush's. However, there are far more similarities than differences with regards to: _non-battlefield targeted killings_ (an estimated 50 under Bush, and _387 under Obama_ ); indefinite detention of suspected terrorists (approved by both through executive orders); broad surveillance authorities (as former NSA and CIA director Michael Hayden admitted on Sunday, _' NSA is actually empowered to do more things than I was empowered to do under President Bush's special authorization'_)"

</comment></comment></comment></comment><comment><USER27> In semi-related news that I can't post because I get the hacker news "please slow down" warning -- hacker takes over website of VZ daily El Nacional and warns govt not to give asylum to Snowden or face leaks of corruption/bribery/etc

[https://knightcenter.utexas.edu/en/node/14126](https://knightcenter.utexas.edu/en/node/14126)

<comment><USER37> Christ, a script kiddie with his own product line[1]... words cannot express my disgust.

[1] [http://jesterscourt.cc/jestergear](http://jesterscourt.cc/jestergear)

<comment><USER26> Yeah, whatever one thought of this prankster before, he's certainly jumped the shark now. Does he think this action is somehow different from anything the "Anonymous" he reviles has ever done? Whatever happened to a letter to the editor?

</comment></comment></comment><comment><USER38> The Western European countries are actively standing in the way of him going to Venezuela, and are actively opposing his asylum.

So what do we do now?

</comment><comment><USER39> Ryan Lizza of the New Yorker purports that the US Ambassador to Russia is denying the conversation stated in the 1st paragraph ever occurred: [https://twitter.com/RyanLizza/status/355717218895536129](https://twitter.com/RyanLizza/status/355717218895536129)

I don't find Wikileaks as a credible source on this topic in general.

<comment><USER18> I don't find the US government a credible source on anything fullstop. Can't you see whats going on here?

<comment><USER40> What if they had vague powerpoint slides?

<comment><USER41> Don't hold your american flag security blanket so tight, you're going to strangle it.

</comment></comment></comment></comment><comment><USER42> The fact that the US doesn't recognize Snowden as a whistleblower doesn't prove persecution or anything at all. He broke the law. He and others may not like it or agree and they don't have to but its still clear he broke the law. What has Snowden told us that we didn't alreay know since 2006? He gave us classified documents and the names and operations of classified programs. Programs we already knew about but just didn't know the name of or how they worked. Hell, even with what he did give us we still don't actually know how they work. But we sure as hell always knew our calls and Internet activity were being monitored.

I'm not a fan of what the NSA is doing but I don't think Snowden is even remotely close to a hero either. Did you know you can take that position? That there's a difference between ones position on NSA spying and whether Snowden is a whistleblower? I'm of the opinion that Snowden _and_ the NSA are criminals.

</comment><comment><USER43> Is there anyway we, as a people, can help other than just support? Is there a petition running to the UN?

</comment><comment><USER44> granting asylum to Snowden will just influence relations between US and Russia,and is not done to be coherent with previous standings of the country on the topic of human rights,almost always different.Russia and others clearly try to challenge the rest of the world to increase their power in times of crisis, how nice,the sooner world leaders realize that the internet is an early glimpse at the future of society and start researching and doing things together the sooner things will improve,for everyone.

Every individual has the particular interest to live in a healthy society,and not to have his possibilities limited by his country of birth if you ask me.

</comment><comment><USER45> I wonder why he can't travel to Latin America. Is it just the issue of not being able to transit through Western Europe or U.S. airports and the lack of direct air connection? Why Mr. Assange does not arrange a private jet flight for him? Moscow to Caracas is under 10K km so it should not be a problem. Even if that's expensive (maybe $200-250K), a few months of living in Sheremetyevo will eat up as much money, or more.

</comment><comment><USER46> Next few days will be interesting to see what Russia will do there.

They do not have the best track record in terms of privacy or human rights, but helping him will make them look good internationally.

</comment><comment><USER40> Wikileaks is using him as a meat puppet and now he is totally fucked, whatever shred of credibility he had is lost by praising Russia for their dedication to human rights. I suppose you can defend their record but you will be fighting uphill.</comment>