Hacker News new | past | comments | ask | show | jobs | submit login

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?




Hi and thanks for the questions:

1. By design the language provides some novel memory invariants including, no cycles in the object graph, no old-to-new pointers, and no pointer updates. Thus, we don't need to worry about cycle collection, can greatly reduce the number of Ref-Count operations, and can (later) employ pool allocation more consistently.

2. Bosque also supports by-value types (including the future ability to do by-value unions) and, since the language is referentially transparent, the compiler can aggressively use stack allocation and copy semantics. Also, the collections are all fully determinized and use low-variance implementations to avoid "bad luck" performance anomalies.

3. The compiler does not enforce the checks. They can either be checked at runtime or checked by converting the program into a logical form that Z3 or another theorem prover can check. Values in the language are immutable and there is no concurrency (yet) but since the language is immutable concurrency is by definition data-race free.


Great to see this point in the design space explored! Looking forward where it goes.


Actually that was already a thing in Mesa/Cedar, Modula-3, Oberon language family and Eiffel.

Sadly Java has not taken this into account, nor AOT support out of the box, and now it is catching up with it.


Eiffel does not enforce preconditions at compile time. What are you referring to?


I was only referring to:

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




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: