Releases: Neat-Lang/neat
Neat 0.1.10: Nothing Important
Mostly a bunch of small fixes that have cropped up over the last week.
- Always set
-fno-strict-aliasing
. This "fixes" some C backend bugs that happened with-O
. Apparently we're supposed to use unions to pointercast data structures? Man, fuck that though. - Add union type, C import union parsing. This means the
(int, int, int, int, int)
hack isn't necessary anymore. - Add
std.stdio.byLine
. - Add
std.algorithm.cumulativeFold
. - Add array
.dup
. - Add 32-bit build. Note this is not very tested.
Neat 0.1.9: The End Of The Beginning
With this release, my task queue of "critical things to implement before the first public release" is finally empty. As such, from here I'll start getting the project ready for actually having more than one user, hopefully!
Changes
- The type of
null
is nownullptr_t
rather thanvoid*
.
Features
- Add ternary expressions (
b if a else c
). - Expand JSON macro to allow arbitrary Neat expressions as leaves.
- Implement function return type inference (
auto foo() { }
).- Add nested function literals (
foo((int i) { return i; });
).
- Add nested function literals (
- Support UFCS template instantiations (
foo.templ!T(bar)
).
Fixes
- Fix
with
fields accessed from nested functions.
Neat 0.1.8: Why did this ever work?
This release fixes a longstanding logic error where the default '.' src package is always considered with the highest priority, preventing package definitions from affecting commandline-passed files in local folders.
This is required for allowing rebuilds in the new build script to actually change the compiler class.
I don't understand how builds ever worked without this.
Neat 0.1.7: The Very Small Release
Just change a few things in the bootstrap build:
- Bootstrap C files are now built in parallel.
- Retrobuilding for pre-0.1.0 works again.
- Note that release folder names have changed. The archive now unpacks to neat-v1.2.3-gcc.
- tar.xz releases are now available for people who dislike the zip format.
Neat 0.1.6: Bootstrap Build
Small change to AMD64 ABI.
Also, I've updated my computer to LLVM 14 and then noticed that my old builds stopped working. This has opened my eyes to the fact that my bootstrap approach is actually terrible. So this version will be the bootstrap build going forward, and the build scripts will be rewritten to use it.
Neat 0.1.5: It's Been A While
Not many new features, but a bunch of speed improvements and bugfixes. Better make a new release then!
- Add multi-parameter lambdas.
%
is now always wrapping.- Implement automatic documentation generation.
- Implement default arguments.
- Implement explicit struct constructors.
- For loops now support preincrement/postincrement operators.
Neat 0.1.4: The Search for Neat 0.1.3
(Also known as "I found some bugs in 0.1.3 after I'd already pushed the tag but let's not talk about it.")
- We have documentation! See the README!
- Add LLVM-based release.
- Link against LLVM-C for the backend.
version()
andstatic if
can now be used inside functions.- Sumtype entries can now be marked as
fail
:(int | fail :error)
. - Error handling is now propagated with
expr?
, which immediately returns anyfail
types in the sumtype thatexpr
evaluates to. - The
if (type <- sumtype)
syntax is gone for now, because it was always kind of a poor replacement forexpr?
. Usecase
to select a member. - For loops are now interpreted as borrowing the current value: mutating the current value while iterating is undefined.
- Lambda syntax is now
a => a + 2
, like in D. case()
is now non-exhaustive. Cases not mentioned will be propagated.case{}
is still exhaustive.- Arrays can be cast to other arrays. Length will be converted. Indivisible lengths are undefined for now, but will cause an immediate program abort in the future.
- Global functions can now be overloaded. This is WIP!
- The list comprehension macro now supports
[argmax(expr) expr for ...]
and[argmin(expr) expr for ...]
. - The
-cpr
flag can be used to generate a critical-path report. This can give insight into why a build is slow. Note that the reported path will only be accurate if multithreaded build (-j8
) is enabled.
Neat 0.1.2: neat build actually works 2: The Revenge
0.1.1 I said "neat build actually works".
So neat build
didn't work in 0.1.1. Second time's the charm though!
Neat 0.1.1: neat build actually works
Like 0.1.0
, except neat build
actually works. 🤦
Neat 0.1.0: Lambdas, IFTI, Ranges
Lambdas
Lambdas are templated nested function references:
auto lambda = a -> a * 2;
IFTI
When calling a template like a function, the template
will be instantiated with the types of the arguments.
template each(Range, Callable) {
void each(Range range, Callable callable) {
for (value in range) callable(value);
}
}
...
each(2..4, a => print(a));
Ranges
Loops will now iterate over values with a fixed protocol.
for (a in range) { }
// --------------
// is the same as
// --------------
mut auto iter = range;
for (mut ElementType a = iter.front; !iter.empty; iter = iter.next) { }