Lasse R.H. Nielsen

Results 1773 comments of Lasse R.H. Nielsen

I'm actually starting to lean towards "pipe" being an unsatisfactory primitive, one where every use-case has a *better* alternative. For doing function calls with the receiver as implicit argument, we...

It's definitely going to be briefer, and is likely to get used a lot. We'd have to define which expressions counts as having a "name" that can be used as...

Usual problem: Being an instance variable is not part of the API, only being a getter is. > all enhanced enum fields must be constant Yes, but they mustn't necessarily...

`yield ?expr;` could make sense. It's an operation that can be omitted, so doing *nothing* if the value is `null` is valid. `return ?expr;` probably won't work. If it just...

What you are defining here is *non-interface methods*. Rather than conflating it with privacy, consider it a separate *kind* of declarations (which may be distinguished using separate name syntax or...

Library privacy solves multiple problems. The *primary* problem is having "private" names that cannot conflict with names from other libraries. It's not so much that others cannot *access* the members...

The use-case for extension redirecting generative constructors is being `const` and allowing evaluation of (potentially constant) expressions before invoking the existing generative constructor. ```dart extension on Symbol { const new...

What of er extended the functionality of redirecting factory constructors to allow ```dart class Foo { const factory Foo.name(args) : SubFoo.otherName(otherArgs); } ``` The `otherArgs` must be potentially constant expressions....

I fear parsing this will make `?` even more overloaded than today. At least a `e1 ? e2 : e3` can only mean two things, and only in a map...

> Would the syntax be parsed differently depending on the presence or absence of an extension defining `bool.operator[]`? Likely not. Parsing is one of the first things that happen in...