--
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
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
With the optional and named parameters why not just do like C#? https://msdn.microsoft.com/en-us/library/dd264739.aspx
--
-g.
@Sean I don't really buy the argument that committing to a name and position is a problem. Packages have semantic versioning for a reason and the analyzer is more than happy to yell at you if you do something wrong.
Originally opened this bug https://code.google.com/p/dart/issues/detail?id=6496 years ago but it got put as WONTFIX. Maybe with this DEP its time to reopen the discussion?
On Wed, May 20, 2015 at 11:46 AM, Don Olmstead <don.j.o...@gmail.com> wrote:Originally opened this bug https://code.google.com/p/dart/issues/detail?id=6496 years ago but it got put as WONTFIX. Maybe with this DEP its time to reopen the discussion?
Unfortunately, probably not.Like most languages, we are trying to avoid breaking changes. This DEP relaxes a limitation but all existing code keeps working. Any more substantial change to the optional parameter syntax would probably be a breaking one.
@Bob I get that having breaking changes is bad in a language but what are you supposed to do when you go down the wrong path?
Is there anything that might be a breaking change in 2.0? On a meta level I'm curious what the criteria would be for doing a language breaking change.
a(b<c,d>(e))
a(b < c, d > (e))
a(b<c, d>(e))
To me the optional/named parameters is the ugliest part of the language
I get that not getting in a bad state is a goal to strive for, but if you never break anything then you just end up piling more stuff on ala C++.
I've personally found the optional parameters syntax a bit convoluted.
function foo({one = 1, two = 2} = {}) {
console.log(one, two);
}
--
I do like having control over which parameter names are part of my API and which aren't.
the pressure to remain familiar remains.
--
ECMAScript is the official name for the JavaScript language we all know and love.
In a perfect world (in my view at least), every browser would have a native newspeak virtual machine and html/css/js would be gone. ;)
Am Donnerstag, 21. Mai 2015 00:01:09 UTC+2 schrieb Jacob Goodson:Why not break the living crap out of Dart since the goal is no longer to be the lingua franca of the web. How about small talk 2.0 or some derivative thereof?
On Wednesday, May 20, 2015 at 4:34:29 PM UTC-4, Bob wrote:On Wed, May 20, 2015 at 12:42 PM, Don Olmstead <don.j.o...@gmail.com> wrote:@Bob I get that having breaking changes is bad in a language but what are you supposed to do when you go down the wrong path?
In theory, we can make breaking changes in 2.0. Even then, though, we want to minimize them. Breaking existing code has a very very high cost.I think the strategy is basically:
- Don't go down the wrong path.
- See step one.
- If those steps didn't work... live with it.
My purist sensibilities would love to make lots of breaking changes to fix previous errors. But the usability side of my brain understands that engineering is about making the most useful thing for the most people. Breaking stuff on them—even to get to something better—is often not the best way to do that.- bob
So +1 if I can take a web app written in Dart and run it on Sky. Otherwise I think they're going down the wrong path.
Why not break the living crap out of Dart since the goal is no longer to be the lingua franca of the web. How about small talk 2.0 or some derivative thereof?
--
For the people with the skills to design a language it doesn't take much to design a language that is better than Javascript. Javascript is nothing more than that nightmare corporate code base that many of us have either written (Unintentionally.) ourselves, or have had the extreme displeasure of having to maintain extended over an entire ecosystem. The only other major difference is that there are lots of highly competent people who have convinced themselves that Javascript is actually good at what we are trying to use it for. However even with this dire state of affairs it strikes me as truly amazing that the major platform that is targeted by Javascript basically does nothing to actually help the people that create applications for it.
I don't see anything wrong with having ambitious goals.
I also don't find it very useful to declare that someone failed at reaching an ambitious goal (especially if the goal does not have a deadline and/or is obviously a long-term goal).
It's like declaring someone failed to go to university while they are still in school.Technology adoption takes time.
On Saturday, May 23, 2015 at 10:37:48 AM UTC+1, Thomas Schranz wrote:I don't see anything wrong with having ambitious goals.Nothing wrong at all. But execution counts.I also don't find it very useful to declare that someone failed at reaching an ambitious goal (especially if the goal does not have a deadline and/or is obviously a long-term goal).Dart did fail in its initial goal - because it had the wrong goal - it didn't focus enough on mobile.I argued that this project should have been more ambitious - the means to join up Android and Chrome OS - join up mobile and the web - preferably with a unified design language (like Metro/Web OS/iOS 7) - which eventually happened with Material Design.It's like declaring someone failed to go to university while they are still in school.Technology adoption takes time.I've heard this argument from Dart team leaders. The thing that's different from even 10 years ago is ubiquitous, cheap and connected computing power from IoT to mobile to desktop to servers. It's a dynamic competitive environment imo made for some of Dart's core ideas.But to use some buzzwords - the project leadership must be agile and reactive. Not maybe-maybe-not we-have-all-the-time-in-the-world if-ever.Dart has an opportunity with Mojo/Sky to get into Google's client side platforms.
Personally I think on the Dart VM side all resources should be used to work closely with Mojo/Sky teams so that the runtime is tightly integrated and also works well with gRPC. Also,the Fletch concurrency ideas - make Async disappear - would have more value here.
This line of reasoning is a logical fallacy commonly referred to as "moving the goal post".
+1or declaring it's an ugly duckling ;-)
On Saturday, May 23, 2015 at 12:14:28 PM UTC+1, Günter Zöchbauer wrote:+1or declaring it's an ugly duckling ;-)const/new - messes up DSL's - see Sky.final Point p = new Point(4,4); // anyone for type inferencetype annotations - union and function types - how?tricky to eyeball anon functions passed as argumentsverbose Java boilerplate for immutable objects - all 'final'
Why does Swift and even Rust look more like scripting languages than Dart?
On May 24, 2015 10:04 AM, "Günter Zöchbauer" <gzo...@gmail.com> wrote:
>
> You shouldn't need the "Point" after "final" and lrn is interested in getting rid of "new" AFAIK. It doesn't seem there is are many opponents.
>
>
Any date set for this? I would like to mark my calendar for a going away party.
You shouldn't need the "Point" after "final" and lrn is interested in getting rid of "new" AFAIK. It doesn't seem there is are many opponents.
Also aesthetically pleasing and easy on the eye.
Of course. But Java dev's will type annotate with final.
imo it would be useful to encourage dev's to use an immutable/single assignment binding as it makes the type inference story much clearer.As expressed in this thread:
'let' seems a natural choice given it's reserved word status in ES6 and the similar semantics in Swift. Also aesthetically pleasing and easy on the eye.
The dev's who may give Dart another chance re Sky/Fletch won't be Java dev's who 'final' might appeal to. Java dev's are conservative - it's the early adopters who Dart once again needs to pick up.
They will not want to see:final Point p = new Point(1,1); // no taste.
var p = new Point(1, 1);
On Mon, May 25, 2015 at 7:06 AM, kc <kevin...@gmail.com> wrote:Of course. But Java dev's will type annotate with final.
Sure, but like you note we need early adopters first, and those generally aren't Java devs.
imo it would be useful to encourage dev's to use an immutable/single assignment binding as it makes the type inference story much clearer.As expressed in this thread:Personally, I don't think explicit single-assignment declarations are needed to help inference. C#, TypeScript, Go, Flow, Hack, and C++ seem to handle inference with mutable variables.
'let' seems a natural choice given it's reserved word status in ES6 and the similar semantics in Swift. Also aesthetically pleasing and easy on the eye.Given that we already have a keyword for a single-assignment binding ("final"), I think it's really unlikely the language team would add another one. That's a bummer because they one they chose seems to turn off a lot of users. I wish we'd done "let" or "val" instead.
final
for readonly parameters and locals as well as fields, I always use it (when applicable) for fields but I often omit it from parameters and locals. I think let
would be a good choice, and I would definitely use it.final
keyword in Java. People should really use it (for reasons I think we all agree with) but the extra keyword makes a surprisingly large negative impact on readability and thus very few people use it. That's why I think it's so important that we have the keyword let
in C# for locals at least, because it's nice and short (val
would be my second choice).The dev's who may give Dart another chance re Sky/Fletch won't be Java dev's who 'final' might appeal to. Java dev's are conservative - it's the early adopters who Dart once again needs to pick up.They will not want to see:final Point p = new Point(1,1); // no taste.That's why the style guide says:var p = new Point(1, 1);But, of course, you know that already. :)
- bob