Hacker News new | ask | show | jobs
by tomatsu 3312 days ago
> Why do I need to care if something takes a `child: (single object)` argument or a `children: [LIST of objects]`?

The IDE tells you what's needed and the latest version of the plugin automatically adds a list literal and places the cursor inside it:

https://groups.google.com/forum/#!topic/flutter-dev/LXafJQqS...

Personally, I think it makes sense to differentiate between exactly one and zero or more.

> Why do I need to memorize which objects take which styling arguments?

The IDE should do that for you.

1 comments

>The IDE should do that for you.

Fail. IDE dependence is an anti-pattern and a programmer-smell.

Either the IDE/editor is able to assist you or you have to consult the documentation regularly.

That's just how it is.

JS' standard library, for example, is really tiny but I haven't memorized all of it. If the editor can't clue me in, I have to check the docs.

Nothing wrong with doing any of it, as long as its a dependency you can manage while also maintaining productivity... but such is the life of a Javascript developer.