This language looks super promising. With the exceptions of 'no type inference' and 'no arithmetic precedence', I really like its anti-features list. With regard to 'no arithmetic precedence', I tried printLn((1 + 2) + 3); and printLn(1 + 2 + 3); Sure enough, the first one compiles, but the second doesn't. Also, (n-1) is a parse error unless you put a space after the minus. I got curious if recursion was properly han…
The Austral Programming Language
101–110 of 124 posts
Re: The Austral Programming Language
#102Earlier quoted context omitted.
Declarations don't need `end function` because it's always clear what you're closing. Statements need an `end if`, `end for` etc. because it lets you find your way in nested code. The rationale for the syntax explains it a bit: https://austral-lang.org/spec/spec.html#rationale-syntax FWIW I will probably get rid of the `module is ... end module.` bit because it adds unnecessary nesting.
Why? No ability to nest functions? Why do you need a semicolon at the end of "end"?
Correct
> Why do you need a semicolon at the end of "end"?
Per the rationale[1], "The purpose of the semicolon is to provide redundancy, which aids both reading and parser error recovery." Also, "For many people, semicolons represent the distinction between an old and crusty language and a modern one, in which case the semicolon serves a function similar to the use of Comic Sans by the OpenBSD project."
[1]: https://austral-lang.org/spec/spec.html#rationale-syntax
Re: The Austral Programming Language
#103I appreciated that it listed "no destructors" immediately after the top-line "no garbage collection", so I didn't need to read any further. What it means is it offers no ability to encapsulate resource management, so not useful for me. That doesn't mean it is not useful to others.
No, on the contrary, Austral is entirely built around resource management. The central concept is linear types, which is about ensuring 1) resources are disposed of and 2) resourced are used according to their protocol, e.g. no use-after-free. There's "no garbage collection" because Austral lets you have manual memory management without the danger, like Rust. There are no destructors in the sense of special destructo…
Re: The Austral Programming Language
#104Has Austral been used for any real-world, production projects? If so, what?
Almost certainly not, and there are good reasons for that. Work on Austral was initiated by Borretti in 2021, but its earnest development really only commenced in January this year. So we're talking about a language that's, for most intents and purposes, less than a year old. Even if the January release was stable, there would not have been time for anyone to develop and deploy significant projects in it. But it is n…
Re: The Austral Programming Language
#105This is fantastic. Clearly, bureaucracy is what we needed all along for memory safety.
Re: The Austral Programming Language
#106Re: The Austral Programming Language
#107Is no one going to talk about their capabilities system? That shit looks cool. A compile time permissions system for which resources can be used. I wonder how fool proof that can be made. Are there escape hatches in the form of arbitrary assembly/linking? Could a leftpad module security issue be deterred with this?
It is assumed this would raise eyebrows from the user of this function. Furthermore if you were to take a “safe” function and replace it with a dodgy one in a later version, the function signature would change and users would need to update their code. So nothing quite so brazen would get past.
Of course if you are mixing in arbitrary assembly/machine code in your binary via linking that might make a syscall and that could potentially be unsafe.
Re: The Austral Programming Language
#108I appreciated that it listed "no destructors" immediately after the top-line "no garbage collection", so I didn't need to read any further. What it means is it offers no ability to encapsulate resource management, so not useful for me. That doesn't mean it is not useful to others.
Re: The Austral Programming Language
#109Has Austral been used for any real-world, production projects? If so, what?
Almost certainly not, and there are good reasons for that. Work on Austral was initiated by Borretti in 2021, but its earnest development really only commenced in January this year. So we're talking about a language that's, for most intents and purposes, less than a year old. Even if the January release was stable, there would not have been time for anyone to develop and deploy significant projects in it. But it is n…
Re: The Austral Programming Language
#110Earlier quoted context omitted.
Yet Austral returns optional types from any memory allocation function rather than calling abort. And stack overflow is a memory allocation failure, so why is the discrepancy? I.e. for the language focusing on correctness this is an unfortunate omission. On the other hand none of popular or semi-popular system languages allows to explicitly control stack consumption. Zig has some ideas, but I am not sure if those wil…
There is discrepancy because things the programmer can prevent are handled differently from things the programmer cannot prevent. The programmer can always statically ensure that the program doesn't experience a trapped overflow, and that the stack size is not exceeded. All the information to do that is available when the programmer runs the compiler. But there is no way to prevent a memory allocation failure when us…