Live data from Hacker News

Type system of Fortnite's Verse language

brianmckenna.org

151–159 of 159 posts

Re: Type system of Fortnite's Verse language

#151

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 w…

One 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 ex…

You got me thinking and I think part of what it comes down to for typed FP languages is that you can either generally

1) Go for a simple design, but having poor interop with existing ecosystems because the language lacks equivalent features. I see Elm in this camp, and it's hard to live in because the FP community has fewer people than other communities to build up another ecosystem

2) Go for a more fully featured design, integrating with some ecosystem (like F#, Scala), but you end up with multiple overlapping concepts and inconsistency in the native language's ecosystem

It seems like dynamic FP languages are the only ones to get away with a simple core and wide ecosystem by avoiding the need for features that are important for writing modular code in typed MLs. OCaml is probably closest to the sweet spot as a language+ecosystem, but the language tools are a bit weak coming from other platforms

Re: Type system of Fortnite's Verse language

#152
post #133
post #94

Earlier quoted context omitted.

> 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.

Programming 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 - hu…

In functional languages, you seldom replace an existing value. Verse, like Rust, is mostly single-assignment.

Re: Type system of Fortnite's Verse language

#154
post #137

Earlier quoted context omitted.

Most 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…

Go 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 beg…

This is textbook bikeshedding. If you have a bias for C syntax, everything else will look niche, weird, or "clearly insane" to you. But there's no reason that we should prefer C's syntactic decisions for assignment and equality operators in a non-C language. Go itself deviated from them, and the authors were instrumental to C itself.

Re: Type system of Fortnite's Verse language

#155

Earlier quoted context omitted.

Yes, but it's not an exclusive design goal. Other goals are listed on that page and you can see how design tradeoffs happened. You don't prioritize simplicity over all and make concurrency a core pillar! And certainly I think they pulled it off. Go through the lessons here to see what I mean in nothing stands out as beginner unfriendly here, but it's also not black boxing much in the way Python would. https://dev.epi…

> And make concurrency a core pillar! For such a core pillar they are extremely light on details. All you can see in the docs is they basically have: - green threads (maybe? no idea, no details on how async is executed) - "async calls" are blocking. Literally the equivalent of `x = await y()` - to have non-blocking calls you can use `Task = spawn(function)`, and then can optionally wait on it with `Task.await()` - th…

Disagreeing with some of the decisions they've made in regards to concurrency doesn't negate it from being a core pillar. Neither does wanting more information on why they've made the decisions that they have. This is common sense.

Re: Type system of Fortnite's Verse language

#156
post #154

Earlier quoted context omitted.

Go 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 beg…

This is textbook bikeshedding. If you have a bias for C syntax, everything else will look niche, weird, or "clearly insane" to you. But there's no reason that we should prefer C's syntactic decisions for assignment and equality operators in a non-C language. Go itself deviated from them, and the authors were instrumental to C itself.

> But there's no reason that we should prefer C's syntactic decisions for assignment and equality operators in a non-C language.

Yes there is - because almost every language uses the same convention, and it's a totally reasonable one. You have to have a really good reason to go against that and I don't see one.

> Go itself deviated from them

Go didn't deviate from the C convention. It just added an extra shorthand operator to simultaneously declare and initialise variables. The meanings of `=` and `==` are the same in Go as in C.

> or "clearly insane" to you

I wasn't saying the use of `=` for equality is clearly insane. `[` is clearly insane for other reasons.

Re: Type system of Fortnite's Verse language

#157
post #136
post #83

Earlier quoted context omitted.

Few would consider Smalltalk to be a LISP.

I'm not claiming that Smalltalk is a LISP. I am saying that LOGO is old. It was written the same year that BCPL (the predecessor for C) was written. To say that LOGO is a member of {language family}, it should be restricted to languages that were in use at that time. LOGO is a member of the LISP language family. From there, it also went on to influence many other influential languages.

"Family" perhaps, but calling it a LISP is going too far when it doesn't have true macros (indeed most implementations have no macros at all). And to my mind the close similarity with TCL as a language is a lot more interesting than the details history, even- especially - if it's a point in the design space which both languages discovered independently rather than a case of one influencing the other.

Re: Type system of Fortnite's Verse language

#158

Coming from the paper on Verse Calculus and having watched Simon Peytonjones’ talk last year I was super excited to try Verse in UEFN last week. Much to my dismay instead of a rich functional language I was met with something that looked like a DSL with python inspired syntax. As I played with the language I couldn’t stop thinking about “choice” and the other feature of verseMax I felt I was missing out on but after…

I really like FP, but I think most FP language designers are a little too enamored with cryptic symbols and abbreviations. Tried f# but the abbreviations turned me off, e.g. seq instead of sequence.

Re: Type system of Fortnite's Verse language

#159
post #133
post #94

Earlier quoted context omitted.

> 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.

Programming 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 - hu…

In Verse there's no such thing as equality comparison. Assignment is the only thing that = does.If you want to do something if two things are equal, you attempt the assignment and whether this is logically consistent with the rest of the program determines whether the other things are executed.
Post reply on HN