672 karma · joined January 29, 2020
HHAST and LibCST are notable examples in the right direction.
[0] https://kotlinlang.org/docs/generics.html#variance
[1] https://kotlinlang.org/docs/generics.html#declaration-site-v...
class CovariantFoo<T> {
private phantom!: T
}
class ContravariantFoo<T> {
private phantom!: (_: T) => void
}
class InvariantFoo<T> {
private phantom!: (_: T) => T
}
(inspired by Rust [0])> Luau’s type system is structural by default
I think that makes it the second (production-ready) language to have a primarily-structural type system, after TypeScript/Flow(/and Closure to some extent) for JS. I wonder if it will follow in their impressive footsteps or if it will tread new territory.
One of the things that Flow gets right that TypeScript doesn't yet support is switching to nominal type-checking between class instances. In TypeScript you can assign an instance of one class to an instance of another as long as they have compatible fields. Compare:
Flow: https://bit.ly/3jZx4rB
TypeScript doesn't have any understanding of prototypes or prototypal inheritance, which is a big gap considering that it's a fundamental aspect of JS.
I'm really hoping Luau will come to do the right thing with tables and prototypes. Perhaps it already does, but unfortunately there doesn't seem to be a Luau playground to try in the browser.
> Thanks to aggressive memoization and dynamic code generation at decoration time, beartype guarantees O(1) non-amortized worst-case runtime complexity with negligible constant factors.
I don't think the author(s) understands what "zero-cost abstraction means". O(1) is not O(0). Also let's not forget that memoization incurs a memory cost.
One of the things I'm excited to see is the cap-std project for Rust [0] given what Pony [1] has demonstrated is possible with capabilities. I'm also hoping that languages like Koka [2] and multicore OCaml [3] will demonstrate interesting ways to design APIs around algebraic effects.
[0] https://github.com/bytecodealliance/cap-std
[1] https://www.ponylang.io/discover
He has great taste!
I know the OP probably meant using tables for things like centering elements and doing page layouts (no longer needed since we have flexbox and grid respectively). But for those reading this that don't know any better, you should still use tables for content that is semantically tabular like displaying data. This makes the content more accessible to people using screenreaders.
Speaking of which, Flexbox Froggy and Grid Garden are fun and addicting ways to learn:
And the Axe extension is a great way to learn about modern accessibility best practices:
https://chrome.google.com/webstore/detail/axe-devtools-web-a...
That's pretty magical. Does this mean it would be possible to implement structured concurrency [0], but without the function coloring problem?
Regardless, I think I prefer how this looks from a code read/writeability perspective compared to Zig's or Swift's (and potentially future Rust's [2]) approaches.
[0] https://vorpus.org/blog/notes-on-structured-concurrency-or-g...
> There's also this very nice Ent framework, written by ex-FB engineer: https://ent.dev/
Awesome, hope it succeeds!
> is entGo actually worth implementing as an ORM for Go
I can't speak to how valuable it would be when judged on its own. I just think that it currently does not and probably will not come close to delivering the same level of value as the FB Ent framework.