Live data from Hacker News

The Bosque Programming Language

github.com

21–30 of 178 posts

Re: The Bosque Programming Language

#21

Hi, project owner here, great to see this on HN and always happy to hear from folks here and on the GitHub repo. We also have a webinar with Q&A scheduled for Thursday morning ( https://note.microsoft.com/MSR-Webinar-Programming-Languages... ) which may be of interest as well.

The use use of '=' here scares me: function add2(x: Int, y: Int): Int { return x + y; } add2(2, 3) //5 add2(x=2, y=3) //5 add2(y=2, 5) //7 The language already supports '=' operator for assignment of variables in the current scope, so should you use the same operator for denoting value assignment formal parameters in a function call? This can lead to a lot of confusion between variables in the scope and formal parame…

This and a few other parts seem to be inspired by StandardML / Ocaml

https://learnxinyminutes.com/docs/standard-ml/

Re: The Bosque Programming Language

#22

Hi, project owner here, great to see this on HN and always happy to hear from folks here and on the GitHub repo. We also have a webinar with Q&A scheduled for Thursday morning ( https://note.microsoft.com/MSR-Webinar-Programming-Languages... ) which may be of interest as well.

The use use of '=' here scares me: function add2(x: Int, y: Int): Int { return x + y; } add2(2, 3) //5 add2(x=2, y=3) //5 add2(y=2, 5) //7 The language already supports '=' operator for assignment of variables in the current scope, so should you use the same operator for denoting value assignment formal parameters in a function call? This can lead to a lot of confusion between variables in the scope and formal parame…

Python, one of the most popular languages, uses this syntax, so I'm guessing the vast majority of people don't find it scary (I certainly don't).

Re: The Bosque Programming Language

#23

Hi, project owner here, great to see this on HN and always happy to hear from folks here and on the GitHub repo. We also have a webinar with Q&A scheduled for Thursday morning ( https://note.microsoft.com/MSR-Webinar-Programming-Languages... ) which may be of interest as well.

Can you explain some further things about this languages?

1. How does the GC work? It says "novel reference counting" does that mean it leaks cycles or handles them (either by also tracing or preventing them statically)?

2. Is that the only thing it does to provide a C++-like "resource efficient and predictable runtime"? After all, that's basically Swift (or Python+static types). I think the main improvement that C++ (and C# and Go) have over languages like Java is ability to avoid heap-allocated objects (i.e. stack-allocated structs).

3. it looks like, but it's not entirely clear, that the compiler checks preconditions at compile time - so e.g. I shouldn't be able to call `divide(a, b)` without proving that `b != 0` - is this the correct interpretation? How do you handle mutability and/or concurrency, if at all?

Re: The Bosque Programming Language

#24
Yeah, but what is it?

> The Bosque programming language is a breakthrough research project from Microsoft Research.

Tells me nothing useful about it.

> Bosque simultaneously supports a high productivity development experience expected by modern cloud developers, coming from say a TypeScript/Node stack,

It's a web language then?

> while also providing a resource efficient and predictable runtime with a performance profile similar to a native C++ application

Or a back-end dev language?

Come on, what is it for?

Re: The Bosque Programming Language

#25
Looks like Stainless Scala, mixed with Rust, and given a C++ syntax.

This mix looks interesting as such.

But of course Wadler's law applies: Why THIS syntax? Looks like a blast-from-the-past, bloatty and complex. Modern languages go mostly for some more lightweight look-and-feel. Usually more "pythonic". This would be imo also here the better idea.

Re: The Bosque Programming Language

#26
post #7

I like it already. But the page has a mix of statements ending with ';' and not. Which is it? Pick one and stick to it ;), it triggers my ocd more than naming interfaces 'concepts' and classes 'entity' for what seems like the heck of it. It does look swiftish and ceesharpy. But hey, if I can get something that looks like that, compile down to a small binary as fast as C++, I'll call your interface 'concepts' all day.

I agree about the arbitrary renaming just to make the language syntactically a bit distinct from other languages, while messing around the user. It really is not a big issue but the fact they chose to make it an issue at all by picking a new name for an existing concept is worrying.

Re: The Bosque Programming Language

#27
At this point any new systems language aiming at productivity has to prove itself not just superior to C++, but superior to Rust, without being significantly worse in any aspect. It’s already suspicious by virtue of having a hand-wavy "Int" type (what size/signedness is that?) and it appears to be object-oriented (so we have to rely on compiler optimisations to remove dynamic dispatch) and garbage-collected (so by default any non-trivial type is heap-allocated). These are just ways in which it is worse than Rust as far as performance goes, since "ergonomics"/"productivity" is so subjective. It seems to improve on C++ only by taking the most common C++ patterns and building them into the language so the language doesn’t have to be so immensely complicated, while also improving the syntax. That’s simply not enough for a modern language to be competitive.

Re: The Bosque Programming Language

#28
post #20

> As a result of these design choices there is always a single unique and canonical result for any Bosque program. This means that developers will never see intermittent production failures or flaky unit-tests! So Bosque programs are not allowed to receive input from the outside world? > When an error occurs in deployed mode the runtime simply aborts, resets, and re-runs the execution in debug mode to compute the pre…

> Again, no interaction with the outside world? Or are all inputs recorded during the entire execution?

Inputs would need to be cached (eek, if there’s a lot of state loaded from external services or databases, or if that state is sensitive and you want to control where it may get persisted), but more importantly, output needs to be not output on the rerun (eg database writes and api calls).

> So recursion cannot depend on input from the outside world?

I’ve made a few mini languages (mostly for fun or for myself, but also external DSLs for end users) and I’m a big fan of not allowing unbounded loops. (Although bounded by a dynamic value like an input or the length of a runtime list is ok, so not quite the same thing as described here, it just needs to know the number of iterations before the loop begins) It makes it much easier, in my opinion, to prevent bugs, but of course it does mean you give up expressive power, so while it works for DSLs it’s not great for general purpose languages. I’m also a big fan of synchronous programming languages. I made one that basically runs inside a database transaction and reruns on conflict.

Re: The Bosque Programming Language

#29

Hi, project owner here, great to see this on HN and always happy to hear from folks here and on the GitHub repo. We also have a webinar with Q&A scheduled for Thursday morning ( https://note.microsoft.com/MSR-Webinar-Programming-Languages... ) which may be of interest as well.

The use use of '=' here scares me: function add2(x: Int, y: Int): Int { return x + y; } add2(2, 3) //5 add2(x=2, y=3) //5 add2(y=2, 5) //7 The language already supports '=' operator for assignment of variables in the current scope, so should you use the same operator for denoting value assignment formal parameters in a function call? This can lead to a lot of confusion between variables in the scope and formal parame…

This seems like a non issue to me and as tomp said, is already done in popular languages without problems. The third example (keyword arguments before positional) does seem a bit odd though, as interleaving positional and keyword arguments seems like a recipe for confusion, but using = for keyword arguments doesn’t seem like a problem to me.

Re: The Bosque Programming Language

#30
post #8
post #3

I gotta say you lost me at args->allof It’s 2020, if you’re really serious about building a new language, shouldn’t you at least pick a reasonable naming case convention? (allOf, AllOf, all_of, all-of would all work) (Not talking about the fact that allOf doesn’t seem very consistent with other languages...)

all-of should not work unless your syntax for basic arithmetic is something heinous.

Personally, I’m a fan of just requiring whitespace around operators. I find expressions hard to read otherwise, so think it’s bad practice, but I also find precedence rules awkward in all but the simplest expressions, so like to use parentheses a lot, which mean I don’t necessarily need whitespace-based grouping to make expressions clearer, eg: “a/b + c” I would just write as “(a / b) + c” anyway. I’ve been programming for 20 years so it’s not just unfamiliarity, I guess I just found these things cause me speed bumps needlessly.
Post reply on HN