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.
The Austral Programming Language
71–80 of 124 posts
Re: The Austral Programming Language
#72This 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.
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
#73Earlier 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
Re: The Austral Programming Language
#74Flashbacks 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.
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
#75Earlier 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.
Re: The Austral Programming Language
#76This 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.
Re: The Austral Programming Language
#77This 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…
Re: The Austral Programming Language
#78For 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…
Huh? C++ is split into header files (interface) and cpp files (implementation)...
Re: The Austral Programming Language
#79Earlier 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?
Re: The Austral Programming Language
#80Looking 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)?
My suspicion is that this language would be unusable for real time applications, which is ironically what it would be most useful for.