Notes from May 6th language meeting

Showing 1-27 of 27 messages
Notes from May 6th language meeting Bob Nystrom 5/16/13 1:34 PM
Note that these are my notes from last week's meeting. I was on vacation most of last week so didn't get a chance to send them out. As Andrei noted, there was no meeting this week. I feel like I should use "note" a few note more note times in this paragraph.

API maturity annotations

Lars says Dan Grove wants a decision on annotations that denote maturity of source code. For most stuff, Lars thinks we should just annotate the whole library. The place where makes sense is dart:html. In that case, we can make an exception.

I asked if this is a language question, or just a question for people at the level of the language team.

Lars says Dan specifically said for the language.

Everyone agreed this is a good idea for the Dart system. [Gilad later clarified that they all also agree it is not a language issue.]

Lars says everything except dart:html we'll put in the libraries.dart config file. We can show that in the Editor.

[Dan later clarified was that his question was the meta-question to decide if this issue is a language issue or not.]

? operator

Gilad: Can we get rid of it?
Lars: Yes.
Gilad: OK, done.

map literals

Lars asks if everyone likes the new proposal [that Gilad sent to the language team]. Everyone does.

[This is now in the latest published spec. Basically, you can have non-string keys in map literals. Woo!]

exports

Lars says Florian has some issues about exports. Asked if Gilad is talking to him about it.

[This is the same issue about exports that came up on the mailing list recently.]

library names

Gilad says Kasper's proposal looks fine. Given other decisions we've made, it makes things more consistent.

Lars is reluctantly accepting it.

This means it will be a static warning to import multiple libraries with the same name. This is a breaking change so we should let people know it's coming.

Cheers!

- bob

Re: [dart-misc] Notes from May 6th language meeting Ladislav Thon 5/16/13 10:17 PM

? operator

Gilad: Can we get rid of it?
Lars: Yes.
Gilad: OK, done.

Awesomesauce!
 
map literals

Lars asks if everyone likes the new proposal [that Gilad sent to the language team]. Everyone does.

[This is now in the latest published spec. Basically, you can have non-string keys in map literals. Woo!]

Actually, you can have arbitrary expressions as keys! Love that.
 
library names

Gilad says Kasper's proposal looks fine. Given other decisions we've made, it makes things more consistent.

Lars is reluctantly accepting it.

This means it will be a static warning to import multiple libraries with the same name. This is a breaking change so we should let people know it's coming.

It makes sense to me, but I still wonder about the purpose of library names. They are not very important, as they can be duplicate, but they are so important that duplicitate imports are becoming a warning.

I think I'd just tie library names to package names. At least as a convention.

LT
Re: Notes from May 6th language meeting mezoni 5/17/13 1:19 AM
>> This means it will be a static warning to import multiple libraries with the same name.
>> This is a breaking change so we should let people know it's coming.

Dart does not support namespacing and want prevent this?

import 'package:from_bob/foo.dart'; // called 'foo'
import 'package:from_ladislav/foo.dart'; // called 'foo'

Who wins? Bob or Ladislav?
Re: Notes from May 6th language meeting mezoni 5/17/13 1:31 AM
About annoations and their prctical usage.

At the moment there is no annotations in Dart.
The dust in his eyes.
Or that just something for use in Editor only purpose.
I barely forgot about dart2js.

So it's probably not for everyone but only for Dart team.
Re: Notes from May 6th language meeting mezoni 5/17/13 1:42 AM

Asked a long time ago. 13.10.2012.

If I cannot analize metadata (that defined in language specifiction) at runtime.

Then I can conclude that they do not exist.
Or is it an optical illusion.
Or is it just deception.

If you cannot access metadata then why this called 'metadata'?
Just because this is a beatiful word 'metadata'?

But why it on the language level?

Re: Notes from May 6th language meeting mezoni 5/17/13 1:50 AM
From that which called "The Dart Programming Language Specification"

Dart supports metadata which is used to attach user defined annotations to program structures.
Metadata can be retrieved at runtime via a reflective call, provided the annotated program construct p is accessible via reflection.
Re: [dart-misc] Notes from May 6th language meeting Iván Zaera Avellón 5/17/13 1:50 AM
>map literals
>Lars asks if everyone likes the new proposal [that Gilad sent to the language team]. Everyone does.
>[This is now in the latest published spec. Basically, you can have non-string keys in map literals. Woo!]

Woo! +++  (I don't know why this restriction was in place, but always sounded silly to me; well, to be honest, it more sounded like: "I'm a lazy guy and don't want to support this in the compiler" >:-P ).

Thanks.



2013/5/16 Bob Nystrom <rnys...@google.com>

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
 
 

Re: [dart-misc] Notes from May 6th language meeting Florian Loitsch 5/17/13 2:15 AM
On Fri, May 17, 2013 at 10:50 AM, Iván Zaera Avellón <iza...@gmail.com> wrote:
>map literals
>Lars asks if everyone likes the new proposal [that Gilad sent to the language team]. Everyone does.
>[This is now in the latest published spec. Basically, you can have non-string keys in map literals. Woo!]

Woo! +++  (I don't know why this restriction was in place, but always sounded silly to me; well, to be honest, it more sounded like: "I'm a lazy guy and don't want to support this in the compiler" >:-P ).
The main reason was, that `{ foo: 42 }` looks like a map from "foo" to 42 for JavaScript programmers. In Dart you need to find the variable "foo".



--
Give a man a fire and he's warm for the whole day,
but set fire to him and he's warm for the rest of his life. - Terry Pratchett
Re: [dart-misc] Notes from May 6th language meeting Iván Zaera Avellón 5/17/13 2:18 AM
Ah. I see.

But this is Dart, not JS. For the same reason, I come from Java and "{ foo: 42 }" means "syntax error" to me >;-).


2013/5/17 Florian Loitsch <floi...@google.com>

Re: [dart-misc] Notes from May 6th language meeting Ladislav Thon 5/17/13 2:27 AM

>map literals
>Lars asks if everyone likes the new proposal [that Gilad sent to the language team]. Everyone does.
>[This is now in the latest published spec. Basically, you can have non-string keys in map literals. Woo!]

Woo! +++  (I don't know why this restriction was in place, but always sounded silly to me; well, to be honest, it more sounded like: "I'm a lazy guy and don't want to support this in the compiler" >:-P ).
The main reason was, that `{ foo: 42 }` looks like a map from "foo" to 42 for JavaScript programmers. In Dart you need to find the variable "foo".

Once upon a time, { foo: 42 } was a legal Dart syntax that meant the same as { "foo": 42 }. It was dropped a long time ago, but still :-)

Well, I think that the current state is much better.

LT
Re: [dart-misc] Notes from May 6th language meeting mezoni 5/17/13 2:50 AM
I understand. Dart want add namespaces to libraries.

import 'package:from_bob/foo.dart'; // called 'from_bob.foo'
import 'package:from_ladislav/foo.dart'; // called 'from_ladislav.foo'

Like this?
library unittest.unittest_html_config;

Or may be?
library unittest.html_config;


Re: [dart-misc] Notes from May 6th language meeting mezoni 5/17/13 2:59 AM
This will be possible?
import 'library:unittest.html_config';
Re: [dart-misc] Notes from May 6th language meeting mezoni 5/17/13 3:08 AM
If first segment in library name will be package name then this is equal.

import 'library:unittest.html_config';
import 'package:unittest/html_config.dart';

And this may prevent import libraries from 'hidden' folders like 'src'.
If there no library like this 'unittest.src.html_config'';

But if you still need this then through package import it will be possible.

import 'package:unittest/src/html_config.dart';
Re: [dart-misc] Notes from May 6th language meeting Greg Lusk 5/17/13 5:40 AM
So will the elimination of the ? operator mean that ternary if statements are no longer supported?
--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
 
 
Re: [dart-misc] Notes from May 6th language meeting Iván Zaera Avellón 5/17/13 5:41 AM
I suppose they are talking about the elvis operator, not the ternary operator...


2013/5/17 Greg Lusk <integ...@gmail.com>

Re: [dart-misc] Notes from May 6th language meeting Matthew Butler 5/17/13 6:29 AM


On Friday, May 17, 2013 9:40:49 AM UTC-3, Greg Lusk wrote:
So will the elimination of the ? operator mean that ternary if statements are no longer supported?
 

I suppose they are talking about the elvis operator, not the ternary operator...
 

Neither in fact. They are talking about the ? prefix operator to test if an optional argument was actually passed to a method/function or not.
Re: [dart-misc] Notes from May 6th language meeting Zdeslav Vojkovic 5/17/13 7:12 AM
I was just thinking yesterday why would you want to know whether the argument was omitted or was explicitly set to default value :)


--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
 
 

Re: [dart-misc] Notes from May 6th language meeting Bob Nystrom 5/17/13 9:05 AM

On Thu, May 16, 2013 at 10:17 PM, Ladislav Thon <lad...@gmail.com> wrote:
It makes sense to me, but I still wonder about the purpose of library names. They are not very important, as they can be duplicate, but they are so important that duplicitate imports are becoming a warning.

I don't get it either, but some of the language designers are super gung-ho about them. <shrug>
 

I think I'd just tie library names to package names. At least as a convention.

This is exactly what Kasper's proposal suggests. :)

- bob
Re: [dart-misc] Re: Notes from May 6th language meeting Bob Nystrom 5/17/13 9:08 AM

On Fri, May 17, 2013 at 1:42 AM, mezoni <andrew...@gmail.com> wrote:
If I cannot analize metadata (that defined in language specifiction) at runtime.

I know it's taken a while, but this is coming and is being worked on right now. The Dart team is broken in several smaller groups: the language designers, the VM, dart2js, the Editor, and a few others. Features that span multiple groups tend to take a lot longer to design and implement. The Dart team is spread across several offices (across multiple timezones) so it's much slower when we need to coordinate.

In the case of runtime access to annotations, we need annotations to be speced in the language, we need Gilad and the others who work on the mirrors API to design the API to access them, we need the VM team to implement it, we need the dart2js team to implement it, and we need the Editor folks to support it in the Editor. Designing it also requires coordination across the teams. Since runtime access to annotations can have a dramatic impact on tree-shaking and other dart2js optimizations, the design has to be coordinated with them.

We'll get there, but it takes a while.

Cheers,

- bob
Re: [dart-misc] Notes from May 6th language meeting Bob Nystrom 5/17/13 9:10 AM

On Fri, May 17, 2013 at 2:50 AM, mezoni <andrew...@gmail.com> wrote:
I understand. Dart want add namespaces to libraries.

Import prefixes mostly cover this. They have the advantage of being controlled by the code doing the import and not the code defining the name. That's good because it's the consumer who knows which other names he's using and which may collide.
 

import 'package:from_bob/foo.dart'; // called 'from_bob.foo'
import 'package:from_ladislav/foo.dart'; // called 'from_ladislav.foo'

 
You could do:

import 'package:from_bob/foo.dart' as from_bob;

And then access stuff like:

from_bob.someThingInFoo();

Like this?
library unittest.unittest_html_config;

Or may be?
library unittest.html_config;

Yes, these are both valid now.

Cheers!

- bob
Re: [dart-misc] Notes from May 6th language meeting Bob Nystrom 5/17/13 9:12 AM

On Fri, May 17, 2013 at 2:59 AM, mezoni <andrew...@gmail.com> wrote:
This will be possible?
import 'library:unittest.html_config';

Better syntax for package imports has been on my wishlist for a long time. I really hope the language designers take action on it at some point. Star this bug if you are interested.

Thanks!

- bob
Re: [dart-misc] Notes from May 6th language meeting mezoni 5/17/13 11:12 AM
>> You could do:
>> import 'package:from_bob/foo.dart' as from_bob;

Bob you not understand me. Prefix does not remove library name collision.

>> This means it will be a static warning to import multiple libraries with the same name.

Not class name collisions but multiple libraries with the same name.
Re: [dart-misc] Notes from May 6th language meeting Bob Nystrom 5/17/13 4:29 PM

On Fri, May 17, 2013 at 11:12 AM, mezoni <andrew...@gmail.com> wrote:
Bob you not understand me. Prefix does not remove library name collision.

>> This means it will be a static warning to import multiple libraries with the same name.

Not class name collisions but multiple libraries with the same name.

Ah, yes, sorry I misinterpreted you. My understanding is that the language designers plan to make it a warning to import two libraries with the same name. Short of editing those libraries yourself, there will be nothing you can do to avoid that warning.

To mitigate that, the plan as I understand it is to establish a convention of using the package name as part of the library name. Since package names are unique on pub.dartlang.org, that should help to avoid collisions.

Cheers,

- bob

Re: [dart-misc] Notes from May 6th language meeting mezoni 5/17/13 9:09 PM
>> To mitigate that, the plan as I understand it is to establish a convention of using the package name as part of the library name. Since package names are unique on pub.dartlang.org, that should help to avoid collisions.

That's exactly what you forgot to write in the beginning of the this message.
By the way where the Kasper's proposal?
In Kasper head?
Re: [dart-misc] Notes from May 6th language meeting mezoni 5/18/13 12:03 AM
Bob once says:
"If you never intend to publish your package, it isn't necessary to have a unique name."

Bob soon your words will go down in history.

Or you must correct them.
"If you never intend to publish your package or import other packages, it isn't necessary to have a unique name."
Re: [dart-misc] Notes from May 6th language meeting Juniper Belmont 5/20/13 1:50 AM

As this is a discussion of the Dart language itself, the e...@dartlang.org is a more appropriate place for these discussions.
Misc should be used for discussions that do not fit anywhere else.

You should note that this note has been noted so that the noted note note is noted.

Andrei.

On May 16, 2013 1:35 PM, "Bob Nystrom" <rnys...@google.com> wrote:
Note that these are my notes from last week's meeting. I was on vacation most of last week so didn't get a chance to send them out. As Andrei noted, there was no meeting this week. I feel like I should use "note" a few note more note times in this paragraph.

API maturity annotations

Lars says Dan Grove wants a decision on annotations that denote maturity of source code. For most stuff, Lars thinks we should just annotate the whole library. The place where makes sense is dart:html. In that case, we can make an exception.

I asked if this is a language question, or just a question for people at the level of the language team.

Lars says Dan specifically said for the language.

Everyone agreed this is a good idea for the Dart system. [Gilad later clarified that they all also agree it is not a language issue.]

Lars says everything except dart:html we'll put in the libraries.dart config file. We can show that in the Editor.

[Dan later clarified was that his question was the meta-question to decide if this issue is a language issue or not.]

? operator

Gilad: Can we get rid of it?
Lars: Yes.
Gilad: OK, done.

map literals

Lars asks if everyone likes the new proposal [that Gilad sent to the language team]. Everyone does.

[This is now in the latest published spec. Basically, you can have non-string keys in map literals. Woo!]

exports

Lars says Florian has some issues about exports. Asked if Gilad is talking to him about it.

[This is the same issue about exports that came up on the mailing list recently.]

library names

Gilad says Kasper's proposal looks fine. Given other decisions we've made, it makes things more consistent.

Lars is reluctantly accepting it.

This means it will be a static warning to import multiple libraries with the same name. This is a breaking change so we should let people know it's coming.

Cheers!

- bob

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
 
 
Re: [dart-misc] Notes from May 6th language meeting Bob Nystrom 5/20/13 9:43 AM

On Fri, May 17, 2013 at 9:09 PM, mezoni <andrew...@gmail.com> wrote:
That's exactly what you forgot to write in the beginning of the this message.
By the way where the Kasper's proposal?

It was in a rough document sent to the language team, but not shared widely. I think the relevant bits of it have been added to the language spec now, in particular:

It is a static warning to import two di erent libraries with the same name. 
 
A widely disseminated library should be given a name that will not conflict with other such libraries. The preferred mechanism for this is using pub, the Dart package manager, which provides a global namespace for libraries, and conventions that leverage that namespace.

(Note that the second paragraph is non-normative.) 

- bob

More topics »