Live data from Hacker News

The Austral Programming Language

austral-lang.org

71–80 of 124 posts

Re: The Austral Programming Language

#71
post #49

Flashbacks to TA'ing freshman programming 101 in Pascal: every student got hung up on when to use a period or semicolon or end. And from Austral's fib example (snipped) module body Fib is function fib(n: Nat64): Nat64 is if n We here all understand BNF, Ada, Modula, etc and parsing but imagine explaining to the first day student: Why is there no "end function" like for the other contexts? When do I use a semicolon vs…

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.

[deleted]

Re: The Austral Programming Language

#72
post #5

This quite a shallow observation, but I really wish new languages would cut down on verbosity and boilerplate. Making people type out “function” instead of “fn”, “def”, or nothing at all feels like unneeded friction. I’m not looking for APL levels of terseness, but I also don’t want to have my code mistaken for an essay filled with what amounts to scaffolding.

Have you ever seen the d3 javascript visualisation examples? The author has a physics background, so the code ends up being very verbose with lots of comments about simple programming stuff, yet incredibly terse when it comes to heavy mathematics. I would have done the opposite.

It made me realize that people naturally want to be more verbose when they are less comfortable with the concepts and less verbose when they are very familiar with the concepts. It also made me realize it is totally subjective and there may not be a right answer, that it depends on someone's background and familiarities.

Re: The Austral Programming Language

#73
post #27

Earlier quoted context omitted.

That’s because it fundamentally doesn’t actually impact all that much. By most people’s account, the actual coding part of programming isn’t really a majority of their time. Domain research, speccing, debugging, testing, planning, etc. the microscopic savings in key presses are just really such a strange thing to even debate about when you think about it. Major tersness pushes also tend to cause “symbol soup” and, pe…

>the microscopic savings in key presses are just really such a strange thing to even debate It's about readability

Studies of program verbosity have shown that long vs short names have little impact in other programmers' reading comprehension or code maintainability.

Re: The Austral Programming Language

#74
post #49

Flashbacks to TA'ing freshman programming 101 in Pascal: every student got hung up on when to use a period or semicolon or end. And from Austral's fib example (snipped) module body Fib is function fib(n: Nat64): Nat64 is if n We here all understand BNF, Ada, Modula, etc and parsing but imagine explaining to the first day student: Why is there no "end function" like for the other contexts? When do I use a semicolon vs…

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.

I appreciate the explicit nest around module. I was just suggesting a symmetric and consistent syntax that can be stated simply, to align with the stated goal.

Dare I say, the (important) bit of Lisp syntax fits in a sentence! Yeah they hide the complexity in the library instead...

Re: The Austral Programming Language

#75

Earlier quoted context omitted.

Ehh C is a pretty miserable language to parse. No function definition keyword means you have to get pretty far to realize that you're parsing a function. Pointer syntax is ambiguous with expression grouping. And let's not even get started with the preprocessor. I'd say a good model for simple syntax is Go. Rust has a nice compromise of syntax too, but there are some awkward edge cases.

Shame they never fixed this. Would have been nothing to add a fn keyword at the beginning of all function definitions and then use the MS EEE strategy to bring it into the standard. Of the many changes the committee could make with C, I have to believe a function keyword would be among the least contentious.

Probably couldn’t since people could have named functions “fn”. Although idk, one keyword breaking in 50 years is probably excusable

Re: The Austral Programming Language

#76
post #5

This quite a shallow observation, but I really wish new languages would cut down on verbosity and boilerplate. Making people type out “function” instead of “fn”, “def”, or nothing at all feels like unneeded friction. I’m not looking for APL levels of terseness, but I also don’t want to have my code mistaken for an essay filled with what amounts to scaffolding.

I agree. For a language designed to appeal to grumpy old programmers (see the list of so-called anti-features), it’s not exactly arthritis-friendly.

Re: The Austral Programming Language

#77
post #16

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…

For a language that seems to market itself based on being secure, this is pretty troubling

Re: The Austral Programming Language

#78
post #51

For me, this is of interest: Austral’s module system is inspired by those of Ada, Modula-2, and Standard ML, with the restriction that there are no generic modules (as in Ada or Modula-3) or functors (as in Standard ML or OCaml), that is: all modules are first-order. Modules are given explicit names and are not tied to any particular file system structure. Modules are split in two textual parts (effectively two files…

>It was a mistake how C++, Java and other languages forgot to split interface declaration from implementation definition

Huh? C++ is split into header files (interface) and cpp files (implementation)...

Re: The Austral Programming Language

#79

Earlier quoted context omitted.

The idea is the compiler has a bunch of explicit flags, but the build system (which doesn't exist yet) will have the `foo build`, `foo run` etc. commands and find the files using a package manifest. Essentially like `cargo` vs. `rustc`. I have a little prototype of the build system in Python but haven't pushed it up yet.

what's encouraging you to conceive of the build system and the language as separate things? I never understood why most people making new languages seem to want to have each of these be distinct—why not just define the build using the same language?

For the same reason I want my TV and media player to be separate devices, instead of an all-in-one "smart" TV.

Re: The Austral Programming Language

#80
post #43

Looking nice, I like the rationale. Some questions from my side: - 1. As far as I understand, there are multiple models for a linear type system. Which one does Austral implement? Is it verified to be correct? - 2. Since there is a static checker: What are the limits on 1. expressivity and 2. scalability? - 3. What is the intended memory model (pointer and synchronisation)?

I agree. I would also like to know what the performance implications of this language are. Specifically, having two or more CPUs accessing a single object sounds easy in theory, but in practice it is quite complex.

My suspicion is that this language would be unusable for real time applications, which is ironically what it would be most useful for.

Post reply on HN