Live data from Hacker News

The Verse Programming Language [pdf]

simon.peytonjones.org

221–230 of 387 posts

Re: The Verse Programming Language [pdf]

#221
post #95

Reading half of it I'm struggling to see why they chose the semantic 'false?'. How do you read it? It sounds like a question, why not just 'false'?

AFAICT: Just "false" would be a regular boolean value. The question mark turns it into a logic value so it can be used in conditionals.

But there are no bools in Verse so seems the keyword isn't taken and could have just been syntactic sugar for 0 from what I can tell?

Re: The Verse Programming Language [pdf]

#222

I still don’t get why people would want to type ‘:=‘ instead of just ‘=‘, but okay.

Confusion between '=' and '==' is a typical pain point that beginners have when learning to program. Plus it is super at odds with the notation we all learn in math. ':=' is didactically better because it shows that assignment has an direction. It also leaves '=' for actual equality.

Turns out, a few slides later, that ':=' doesn't have direction; it's merely a contraction of declaration, ':', and equality, '='. So 'x := 3' means the same as 'x:int; x=3'. Perhaps more surprisingly, so does, 'x=3; x:int'.

Re: The Verse Programming Language [pdf]

#224
post #217

I honestly fail to see what properties of the language has anything to do with the metaverse, or millions of devs, etc... At first I though the "choice" construct would be a way to distribute code execution among multiple computers (using the fact that in a grandiose metaverse, everything would be a connected computer with lots of compute time to spare ?) but there is not much detail. Also it's not obvious from the s…

> I honestly fail to see what properties of the language has anything to do with the metaverse, or millions of devs, etc... They're pushing transactions straight from the beginning, which I think is the sanest way for multiple actors to all try to interact with the same world. And for the compiler to stay sane in dealing with transactions, it's necessary to mark effects, which is also in the slides. The inclusion of…

What are transactions in this context? Message passing?

Re: The Verse Programming Language [pdf]

#225
post #83

Earlier quoted context omitted.

> 90% of C++'s useless standard library, The Python library is even larger and doesn't seem to be a barrier. If you know `std::vector`, ` > C++ would also not have been deprecated by Rust. That's an overstatement, to say the least.

In Python the standard library is fairly easily traversed and understood and if there's a better way of doing something it's usually linked I think. In C++ we have.. this.. https://en.cppreference.com/w/cpp/algorithm/transform_reduce

I know supposedly "harder to learn" languages (i.e., functional languages), but my god does that example and C++ look impenetrable.

Re: The Verse Programming Language [pdf]

#227

Earlier quoted context omitted.

In Icon a function ("procedure") can: fail, return a value, or "suspend" (yield) a value (and then again and again). The difference between returning and suspending being that a generator that returns cannot be resumed again. That difference was needed (IIRC) because the alternative would be to end the generator with failure, which could be confused with failure in a boolean sense. jq gets this better by saying that…

Boolean values are inherently a sign of an insufficient data model. Booleans carry no inherent meaning. They don't tell you where they came from or provide any context about what operations or data they are guarding. If your language lets you declare your own algebraic data types, there's no need to lean on a built-in Boolean type. You can create types that actually carry all the information you need so that pattern…

Pattern matching is just syntatic sugar over using booleans and extracting values from data types. This is an exaggerated problem with a cherry picked solution. See what happens when the condition is if a number > 100. Are you expected to convert the integer into a church encoded integer and then write 100 S types? Are you expected to adopt a language with refined or dependent types? Adding a ton of abstractions to fix a problem doesn't mean you now don't have an even bigger problem.

Re: The Verse Programming Language [pdf]

#230
post #8

I'm not sure about the "learn it as a first language" bit. x:=(1|2); y:=(7|8); (x,y) This stuff just doesn't seem intuitive to me. It's not verbose enough to be obvious to someone who doesn't know what's going on. Looks interesting though; that's a really bright group of people. Be curious to see where their project ends up.

That's a hard road to hoe if they're going to just do new syntax for no reason.

It's just more explaining, boring and driving people away.

Post reply on HN