MLElixir - attempting an ML-traditional syntax entirely within the Elixir AST

Whats the downside of this?

You guys should record a video chat on the subject :slight_smile: I bet it would be fun to watch

2 Likes

Downside of what part?

If GC, then OCaml’s GC being generic (though not as generic as Java and .NET’s) means that it cannot make a lot of assumptions that, say, the BEAM GC can, such as it cannot assume that older things do not reference newer things, where that is impossible on the BEAM (which saves a surprising amount of tracing time right there).

The downside of static typing means you have to make certain allowances if you allow hot-code loading. ^.^;

Lol, except a lot involves typing up a post and re-typing parts over and over until it looks good, a video chat would be more… messy. ^.^;

1 Like

Does this effect anything else next to the tracing?

It doesn’t really effect tracing, what it effects is what the system can assume about the lifetimes of allocated memory.

1 Like

The OCaml community in IRC has no idea which package you mean.

Really?! Oh what was it called… ppx_lwt, that’s it!
It’s primarily used for async work, but it actually supports more (and other similar ones).

1 Like

Thanks a lot.

Drup, the creator of this lib means:

that’s only for lwt, not for all monads, and it’s not really a do notation

Yaron Minsky means Reason solves a lot of the syntax issues of OCaml:

Correct, as stated that one is primarily for lwt/async, but it is still a monad implementation and there are others that follow the same style as well. :slight_smile:

I honestly don’t think a lot of things many consider as ‘syntax issues’ are actual syntax issues. OCaml’s syntax is carefully picked to be entirely unambiguous, safe, and concise while remaining readable, and I think it succeeds in that. ReasonML ‘so far’ just seems to add a lot of fluff that does not bring much of anything to the language as of yet.

2 Likes

I guess your coding style differs much from Yaron`s which explains that difference in the experience.
You might run less into issues, which he faces quite regular. Otherwise, I cant explain that difference to myself. :slight_smile:

I doubt that that’s a personal assessment from Minsky. He regularly deals with people who don’t know OCaml but have to deal with their code base and in some cases they’re not even programmers. I’m sure he’s picked up what people find most confusing about OCaml from exposure to peoples’ struggles and speaks from that position.

1 Like

“The syntax is objectively cleaner and better.”

And yes: You become used to such issues. Which is an issue on its own?

“The syntax is in some ways just objectively cleaner and better”.

Minsky paying lip service to the crowd of “everyone outside of OCaml” doesn’t constitute admission of some massive problem stemming from using OCaml.

You’re making OCaml’s syntax into an issue because you want to, when reality is that the very person you’re using as a basis for this has a simple potential way out and he’s not taking it. Note that Minsky has never mentioned that they’ve translated or attempted to translate any of their code to Reason, which would be exceedingly simple to do given the relation between the two.

When Jane Street were getting going with jbuilder, the build system they developed for themselves and then open-sourced, they weren’t even looking at supporting Reason. They added that support solely on the urging of Reason developers (which was trivial to do). Given that, there’s no indication that Jane Street are looking to move to this language with what Minsky supposedly thinks has much better syntax (your interpretation) but with the same semantics (the reason Jane Street uses OCaml).

You’re taking what the guy is saying (which is obviously to some extent just pandering to the idea people outside of OCaml has and to some extent just “Yes, a wart, but still preferable to the alternative”) instead of what he/they are actually doing: Not switching to Reason.

It would be trivial for Jane Street to move to Reason module by module, yet they don’t. Given your very strong interpretation that “OCaml has tons of syntax issues and Reason fixes all of them”, how do you reconcile that with reality? There is no massive issue and it’s just a few syntax idiosyncrasies that fundamentally don’t matter in the end.

2 Likes

Well of course. I would not have done this either since it results in a time consuming and confusing progress of transition. Note that I criticized Reason also for curly brackets all over the place and that I enjoy OCaml’s syntax a lot.

Due to the curly braces and my heavy confusion to such a clutter, would I even prefer plain old OCaml code over Reason, for both cases, reading and writing it.

Its much easier for me to follow this strategy of what I call scope inference, which OCaml provides and yes, this outperforms all the other issues in the language to me.

Its not that OCamls syntax is completely an issue, I simply state that it has same issues who are getting resolved by the Reason team, so does the chief architect of the largest adopter and contributor of and to the language.

Without Jane Street would be significantly less usability in OCaml if we are true to ourselves since the standard lib is quite small and other contributors do not provide enough to replace Jane Streets libraries, correct?

So I think its rational to not play down what he states.
He also says that he loves OCaml and I feel so as well. :slight_smile:

OCaml is genius, which is why I am here.

Where do I state that?

No, it won’t.

Since they are now used to these issues which means they became features to them.

They are used to it, so its fine. At Jane Street are working professional developers with plenty of experience. Compare that to new developers, who came from another language or consider OCaml as their first language and you will see why some of the syntax changes in Reason do make sense.

Because they mean increasing adoption to the language.
Something that OCaml really cannot say about itself, while being genius.
Elixir is heavily based on making the ErlangVM more usable to newcomers.
And highly successful doing that.

Yes, the differences between OCaml and Reason or F# are by far smaller.
Which anyways confirms my statement.

The changes in the syntax have their roots in a survey for OCaml developers.
I think Cheng Lou and his team state this.
So they are based on actual evidence, both by the community and the largest adaptor and contributor.

This is the actual issue: Humans become used to things.

OCaml’s issues are not primarily issues to the established developers
they are issues to other developers who are used to how they expect it.

This is also why the curly braces in Reason:
Their user base is used to this issue so it becomes a feature for them…

This is also why C++ still exists and Java and so on:
Not because they are superior, just because people become used to it. Plain and simple.

And then, the whole industry becomes used to it.
You can track that down to the decisions of managers.

Objective C, C++ and through that Java and C# got written plain and simple because managers avoided Smalltalk, while it has objectively easier syntax and a lot of conceptual advantages.

The mixture of C and Smalltalk is fundamentally based on a design decision of somebody who thought it is a great idea to sit on the old thing, while the new one raised up and the developer decision, to mix both.

Not that C, C++ and all the others which I mention are bad languages:
They are simply unsuitable for many, many tasks, IMHO.

While they show us some advantages is this for sure not reflected in the actual usage of these languages.

Some people just blindly follow the pack without enough evaluation on their own to come to a conclusion which is in sync with their free will.

And my conclusion is, that both, Reason and OCaml fit much more in my mind as 90% of all the other languages on the market. I evaluated hundreds of them and to suggest I dislike the OCaml code in some way shows clearly that you don’t follow my lines when it comes to this.

Plus, the curly brackets are probably also a reason why a long year standed team won’t switch to Reason.

There are obvious reasons as well, why they don’t switch to F-Sharp.
Such a switch brings even more new things to adopt as a switch to Reason and stops the development for months. Does this mean there are no syntax improvements in F#?

Does this mean, they play a role in the adoption? To me, this is the case.
And for a lot of others too.

And where do I state that?

Well let’s take their most used library, Core, there are a number of alternatives out. Plus have you seen the package count on opam? It is not small by any stretch. ^.^;

They’ve made a lot, but there is a whole lot more by others as well, don’t discount them.

It would be, they compile down to the same thing, like it’s easy to mix elixir and erlang.

I recall them stating that the syntax changes are mostly bikeshedding from javascript developers on their discord for reason?

Unsure about Java, but C++ still fills multiple niche’s that no other language is capable of yet, Rust is getting close but not even it yet.

Less so than many thing. I still say it has a very modern syntax, fantastic speeds, etc… etc…

That the .NET VM rather sucks… ^.^;

You missed to read about two dozens lines.

Sure, others call it so.

Yes, partly. Do you think, this is the only reason, why C++ still exist in such a large way?
Is C++ really the right tool for the job in nearly all the cases?
Is it sane to use C++ in such a large scale, as it is used today?[quote=“OvermindDL1, post:96, topic:3693”]
That the .NET VM rather sucks… ^.^;
[/quote]

Well, luckily not for me.

I can make no mention about this design choices, but from an architectural standpoint it would be fairly trivial overall.

This is the big reason. C++ is powerful and detailed and you can control every tiny little thing that you could possible ever imagine. Right now there is no language that is comparable (not even Rust allows for delving into architecture specific assembly for example, you’d have to link externally).

Not ‘most’ by far, but for a lot of things it is very well suited. It’s library ecosystem is second-to-none while having performance that is trivially achievable compared to other languages if written well. And really if anyone uses any UB code or any old C-style code without major reason to is a failing of themselves as a C++ developer (that would be akin to doing everything in Elixir for a web server in a single process, it is just wrong).

So what I mean…

So why do you think is it still on top of the list? Why Java? Why are all these languages so popular?

For any given language it is usually just a case of being in the right place at the right time, marketing, etc…

Merits, sadly, often has little to do with it (or we’d all be using a Lisp probably).

3 Likes

Or not… I don’t know how true that essay is, but it’s an intresting read anyways. And if true might impact Elixir’s success in the future.