Earlier quoted context omitted.
Simon Peyton Jones (of Haskell) is working on Verse, a functional relational programming language, that merges the ideas of both functional and logical programming into one. It’s being done to facilitate Fortnite metaverse, as he’s doing this work at Epic. https://youtu.be/OJv8rFap0Nw?si=OmBT9CBJIxdJE1Jv
Functional logic programming much before Verse https://mercurylang.org/
I'm not mutable, I'm partially instantiated
71–77 of 77 posts
Re: I'm not mutable, I'm partially instantiated
#72Earlier quoted context omitted.
I always thought that pattern matching would be an excellent feature for other programming languages, but it seems that it hasn't become popular. Many strategies available to Prolog could become possible just by the addition of this feature. One possible implementation of the idea occurs with C++ templates specialized with numerical parameters. It also seems that Mathematica provides pattern matching, but I don't use…
Erlang, Elixir, Swift, Rust, Python, probably some others. That list is roughly in order of how capable and useful the pattern matching is in each of those languages. Erlang was originally written in Prolog. Also, I definitely agree it's a feature I miss everywhere when not using Erlang/Elixir.
Re: I'm not mutable, I'm partially instantiated
#73Re: I'm not mutable, I'm partially instantiated
#74Only slightly related, I wish there were a way to express this in run-off-the-mill, imperative/eager languages. Eg some way to explicitly mark a class, or something like it, as immutable-but-partially-instantiated. TypeScript supports this a tiny bit by means of its `readonly` keyword which lets you assign a value in the constructor, or in any method called from the constructor . But no later than that! If there was…
Re: I'm not mutable, I'm partially instantiated
#75Only slightly related, I wish there were a way to express this in run-off-the-mill, imperative/eager languages. Eg some way to explicitly mark a class, or something like it, as immutable-but-partially-instantiated. TypeScript supports this a tiny bit by means of its `readonly` keyword which lets you assign a value in the constructor, or in any method called from the constructor . But no later than that! If there was…
Both Java and C# do. In Java marking a variable final makes it immutable after assigned. In C# a variable marked readonly is the same.
Re: I'm not mutable, I'm partially instantiated
#76Earlier quoted context omitted.
Both Java and C# do. In Java marking a variable final makes it immutable after assigned. In C# a variable marked readonly is the same.
More precisely in C# a readonly field of a type can only be assigned to within that type's constructor.
Re: I'm not mutable, I'm partially instantiated
#77Earlier quoted context omitted.
Erlang, Elixir, Swift, Rust, Python, probably some others. That list is roughly in order of how capable and useful the pattern matching is in each of those languages. Erlang was originally written in Prolog. Also, I definitely agree it's a feature I miss everywhere when not using Erlang/Elixir.
I'm curious, how does Swift have better pattern matching than Rust?
There's a decent discussion from a few years ago on hn, as well: https://news.ycombinator.com/item?id=24662262