Derw changelog, February 2023
I've been spending a lot of the last few months reading and writing. I wrote about the case for building something wonderful alone, my most popular Derw-related post so far. Go check it out if you haven't read it. Another big post has been my announcement of opening sponsorship for Derw. And finally, if you're curious what's coming to Derw this year, check this out.
I've been sick the last month or so, though I managed to get a lot done. It was the type sick where your body's not working as it should, but your mind is relatively clear. So there wasn't much for me to do other than work and Derw.
My current big project is adding type holes - for which, I need to change how type inference works, which was on my list anyway. Now every expression will be stored in the AST with the expected type and the inferred type, whereas previously this was done as a separate step. I've also been diving deep into what's possible with a language server - in preparation for leveraging the TypeScript language server in combination with the Derw language server, so that types from TypeScript are represented in Derw code. The result of these two pieces of work should mean that we'll have a more sound type system - including typed holes which can be filled from TypeScript code bases. Apart from that, there’s been a lot of small bug fixes and improvements to compiler errors - particularly where types are concerned. I guess I’m diving deep into types right now.
Also a shout-out to my two sponsors, helping make Derw possible! If you'd like to sponsor this work too, head to my sponsor page. We also hit 314 stars on Github which is exciting.
If you're on Twitter, head over to Derw lang to follow. Also on Mastadon at @email@example.com
Nested type arguments are correctly wrapped.
Rewrite of the type parsing algorithm to simplify the code.
Rewrite type token parsing to Derw.
Error messages for object literals and union types now tell you when properties are missing, or if the inferred type did not match the definition.
Remove unused tests.
Ensure that variables are not shadowed in list range code.
derw versionto see which version is installed.
Consts within a let block get the correctly namespaced types.
Jump-to definition support within the vscode extension.
Publish vscode extensions to vscode store.
Expand type inference to include items currently in scope, including top level definitions, arguments, and let blocks.
Inline if and case statements within lists are correctly parsed.
Types from other Derw files are used during type checking.
A single tag from a union type (e.g
Just) can be used as a type.
Nested object literals get better formatting.
Whitespace around parens in
Rewrite the README with a focus on the Gitbook.
typeto be used as a property name in object literals and type aliases.
Bump packages for security purposes.
Improved formatting of empty object literals.
Fix parsing of constructors within parens.
Fix type inference of nested constructors.
Fix parsing of nested object literals that prevented functions from being called correctly.
Language server auto-completes file names in the imports.
Fix parsing of function arguments inside an object literal.
Automatically give names to missing argument names based on the type of the function.