6 ms·
There's a lot of bummed out comments in here about the syntax, but to me it looks a lot like what someone might see in a reimagined Typescript. Maybe a little H
by JackMorgan 4y ago
There's a lot of bummed out comments in here about the syntax, but to me it looks a lot like what someone might see in a reimagined Typescript. Maybe a little Haskell thrown in for good measure. I agree they probably would have been better served just using an existing language with loads of existing tutorials like C# or Python, but if they're going to make something totally from scratch, I think a lot of decisions will actually make the language pretty easy to learn.
Everything being an expression should prevent a big trip hazard for new developers. As someone who teaches programming a lot, expressions vs statements vs special forms really confuses new developers.
In a lot of ways, this seems like a lot of good ideas from Haskell and Typescript, put into a straightforward syntax. I'd bet I wouldn't even think about the syntax after a week of cranking out code.
And the possibly to have dependent types down the road is very exciting! That would make things like STM so much easier, which would help immensely with scaling code.
- pavlov 4y agoThe main problem with using an established language like C# or Python in an embedded context is that they come with an expectation that the existing library ecosystem is supported. And that’s often just not realistic. The security implications of embedding a language like Python can be massive. Even the most basic libraries would be broken (e.g. a sandboxed script won’t be able to read and write files). And it may be just too much of a burden to try to enable decades of legacy cruft built with different assumptions than the host app (e.g. blocking vs async). You end up with a halfway language that has the syntax but none of the ecosystem. And that’s a poor experience for a new developer who googles a Python tutorial, copy-pastes code into Fancy Metaverse App, and is immediately greeted by a horde of mysterious errors.
- qprofyeh 4y agoI don’t see it like that. Because most of the tooling and ecosystem will work fine. No need to reinvent linters, formatters and dependency infrastructure. Perhaps slightly, 20% of the effort. Also, a subset of a language that does not include the batteries/platform is what made Node (and JavaScript as a general purpose language) possible and eventually very popular. Pragmatic communities deal very well with problems like these. Blender uses Python as scripting language and has tons of amazing plugins. I understand that Epic wouldn’t prefer a dynamic language (everything is a mutable object) though.
- Animats 4y ago> There's a lot of bummed out comments in here about the syntax Consider the target audience - first time programmers. Verse has a syntax without the historical baggage of C, but still rather conventional. They avoided going off into functional strangeness land. ("Daddy, what's a monad?") Define and initialize := Equality test = Assignment set a := b And and Or or Reasonable enough.
- Asooka 4y agoProgramming languages have settled on '=' for assignment and '==' for equality comparison. Teaching people non-standard syntax because you think it might be easier is just doing them a disservice. Everyone I know that started with Pascal was mostly pissed that they didn't learn a language actually used in industry and had to re-learn the syntax. It's not like mathematical notation is intuitive in some way either - humanity needed several thousand years before we came up with something ergonomic, plus '=' is used for assignment in math just as often too. At least I do not know of any mathematician who uses ':=' to denote assigning a value to a name.
- nequo 4y agoMost programming languages but not all. Three prominent examples are Pascal which you mention, OCaml, and the POSIX `test`/`[` command which all use `=` for equality. (More specifically, for structural equality, in the case of OCaml.) More intuitive to complete beginners and definitely not unheard of. In mathematics, I have seen both `:=` and `\equiv` for assignment. But Go and Pascal also use `:=`. Of these, I would consider Go quite widely used in the industry.
- IshKebab 4y agoGo only uses := for declare & assign. For simple assignment it's =, and equality is still ==. So I would say it is barely different to the norm. POSIX `[` is clearly insane so let's ignore that. Which leaves Pascal and OCaml both of which are quite niche. I think he's right. It's definitely not worth going against the grain with this syntax, and it's debatable if it's even that bad in isolation. I seriously doubt beginners struggle with it.
- tm-guimaraes 4y agoOne thing I noticed when I was in college was that the basics of FP is not hard, in fact it seems way easier (from my data annecdote). In my university CS course, we start with FP (using Haskell), and in a course with one of the biggest number of dropouts un the first year, FP wasn’t really a reason for it, in fact, from the ten 1st year classes FP was in the top half in success. BUT what I actually took from that experience was that the students having more trouble with FP (excluding dropouts that failed everything) were actually people that had programing experience before college. For the rest of the world pure functions are easy and “x = x + 1” is confusing as hell. To note that even though we used haskell, monads were just a light touch at the end mostly to use IO. Haskell has an intrepeter, so you could have a language that mimics how you wrote functions before. It also helped that we learned recursion paralel with induction on a math class, so we where recursing over a Natural Int type on FP while difining naturals through induction on a math intro class (and proofs over inductive definitions are usually do e with recursion). FP suffers from * unfamiliarity from the general programing community * bad tooling due to smaller community * people very vocal about a language like haskell which has research and teaching before production in its goals * no decent bridge from the academia ivory to industry. Some languages like elm most issues but suffer from smaller community and weird dictator. Erlang was industry first but had a very small community (thus tooling), until elixir came aling decades later. And its focus get “solved” at a different layer/abstraction level by k8s. Ocaml has shit tooling F# is Microsoft ocaml, but suffers from most things you want to use with it are tailored for C#. Lisp derivatives seem to live in a world of their own. Closure seems popular, and i guess emacs will never be irrelevant. And in lisps you have to learn all the vocabulary as each project is almost its own language. So we need an FP language doing what GoLang did to C++. Few features, very good tooling and libraries (as in golang has a formatter, builder, dependency manager, etc all on its “compiler”, and strong std lib), easy to read. Basically focusing on Developer productivity from hour 1. An “ML for the masses”, just like go was intended for devs straight out of college to be productive on day one.
- foderking 4y agowhat about scala?