by bmitc · 3y ago · 0 comments
* I'm a little disheartened to see "Objectively: no. All languages are Turing-complete" in the context of the question of needing another language. It's a throw away comment and largely irrelevant when considering the actual use of programming languages. If one has to state this platitude, it is more accurate to say "theoretically" rather than "objectively", as I think the latter is actually debatable.
* The utility of the choice syntax over comprehension syntax is not clear at all. The choice thing seems neat, but I don't understand why comprehension semantics weren't just extended. Every example of choice seems to refer to sequences and comprehensions anyway to make the meaning clear. Will have to see more examples. Right now, the syntax seems a bit quirky, especially with `false?` thrown in.
* Why is `fst` not named `first`?! The shortening is maddening to me. It saves two characters (negligible savings), decreases readability, and first is probably just as fast to type.
* I'm still not sure why they're creating this language, what problems it solves, and what any of it has to do with a metaverse.
These are professors and language experts, so I'm a bit surprised by the presentation. Also, the idea that this language will be learnable as a first language is ambitious, if not naive.
SPJ is an exceptional public speaker, but that involves a lot of talking, a lot of context, audience participation, and a lot of wild gesticulating at slides.
I'm not sure if this talk was recorded, but I am sure if it was the recording will be much better than the slides, the slides are not really designed for consumption outside of the talk context, but rather as a reminder rather than taking notes. At least that's my experience having seen a number of his talks over the years.
When you are building simple structures to iterate upon, it makes sense to use the more readable comprehension syntax, where you define a list or set of items and their desired properties.
Yet this terse syntax makes more sense for logic programming, where a lot of the domain logic is built upon generate-and-test patterns; you define a combinatoric search space which is the enumeration of all base value in pairs (or tuples), and check which ones are kept for the next processing steps. When using this pattern, it's clearer to be able to express the space with the shortest syntax rather than the verbose one.
As for the adequacy and need for the language, I have my own ideas on what's needed for the stated use case, and I do agree with the authors that this kind of language will really be easier to learn for people without a programming background; it looks much more like mathematics than the traditional von-Neumann-architecture, continuation-based languages, and its declarative nature may make it easier to approach without having a full understanding of runtime behavior.
I didn’t think otherwise. Many functional languages have comprehension syntax, and I prefer declarative programming.
> When using this pattern, it's clearer to be able to express the space with the shortest syntax rather than the verbose one.
How is
x <- [1,2,3]
or x <- {1,2,3}
more verbose than x := (1|2|3)
? Also, the first and especially second are basically identical to mathematical syntax, but the first implies order better.[(x, y) for x in [1, 3, 5] for y in [2, 7, 8] if x < y]
It's a single monolithic expression that builds the list. The choice syntax however represents each generator and each test as separate expressions, which may even be part of different functions. This seems to offer more flexibility. For example (I don't know the exact syntax):
x:=(1|2); y:=(7|8); x<y; result = (x,y)
Here result is bound to the same values as in the comprehensive list; but these values are yield one at a time, instead of being part of a structure that you traverse.
I am not surprised by this at all. If they really want to create something practical, I would rather employ the creator of Turbo Pascal, than one of the creators of Haskell. To me it seems as SPJ et al. are taking the money to do something fun and interesting, and scratching an itch they had for some time. Nothing wrong with that, but don't expect something that will be useful anytime soon.
SPJ has been implementing features that the industry and real world users wanted in Haskell for decades and yet you expect his cooperation with another great dev and business person like Sweeney to be fooling around and not produce "anything useful anytime soon"?
I recommend you reading the transcript of one of the latest SPJ's podcasts, he speaks both about the role of languages in the real world and about Sweeney's project:
No writer does this. Why are programmers obsessed with word length to such a degree?
Mathematics uses symbols because there is usually no specific context for an abstract concept, and on other cases it relies on convention to provide context. Shorter names are additionally a side due to the density of information and the ability to write complex symbols on a chalkboard and in LaTeX. The symbols are the meaning and not some shortened version of it.
Personally I've got used to them like in no time
That you fall somewhere differently on any or all of those spectrums than the author is fine.
x = fst(some complex expression)
y = snd(some complex expression) (x, y) = some complex expression
And I’m not for sure if this alignment overrides the readability aspect. Verify few languages have alignment in mind, and even less formatters do, so it isn’t clear why alignment is so strongly needed in this very particular case. And what about third and fourth?