// Declare an immutable binding to a new Point object:
// Dart
final Point p = new Point(0,0);
// Swift
let p = Point(0,0)--
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.
Of course you can leave the type annotation out of the Dart example, making the comparison come down to "final" vs "let" and the "new" keyword. I might or might not agree with you on which is better, but I don't think this example is particularly meaningful.
Some of the more significant differences would be structs, blocks, static typing and extension methods.
--
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.
My thoughts exactly. It's disheartening to see in Swift the language that Dart could be.Btw, Swift looks at least as 'familiar' to me as Dart.-g.
Does it run in the browser?
My thoughts exactly. It's disheartening to see in Swift the language that Dart could be.Btw, Swift looks at least as 'familiar' to me as Dart.-g.
I didn't expect it ;-)
I guess Swift is more comparable to Go then.
--
Ladislav forgot to add too:
- Dart is open-source.
This is really cheap. This is how javascript kiddies compare their languages. We, grownups, at least look at language features.
For example, here are some things that Swift has:
// Declare an immutable binding to a new Point object:
// Dart
final Point p = new Point(0,0);
// Swift
let p = Point(0,0)
One of these looks succinct and modern. The other 1995.
K.
--
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.
Swift seems to have roots in the natural science field.
http://swift-lang.org/
I do not know how or why Apple chose that language for its future.
--
An Apple-only language? Pass.
--
On Tuesday, June 3, 2014 11:31:36 AM UTC+1, Ladislav Thon wrote:This is really cheap. This is how javascript kiddies compare their languages. We, grownups, at least look at language features.The point re 'final/new' is that Swift made the right syntax call. Whereas Dart stuck with a core Java-ism, which turns away potential developers. Especially scripters - kiddy or otherwise.
In the Swift WWDC presentation the 'regular and composable' syntax of Swift was emphasized more than once. Gilad Bracha when asked what the most important feature of a programming languages was, replied 'composability'. Dart's Java-isms detract from it's composability, make growing the language more complex and hide it's good clean core semantics.
There is no need for panic, just because Apple made a nice presentation the other day.
Oh come on, this gets really old. This is a language designed for large applications and teams -- a little bit of discomfort in scripting situations is a good price to pay (note that the focus is on little here).
class Point(int x, int y);
myfunction(int a, int b)-> Point {
var x = a;
let y = b;
return Point(x,y);
}
// n.b this is apart from whether type annotations should be rhs (with or without a colon).
There is no need for panic, just because Apple made a nice presentation the other day.No panic, but maybe we could consider 'borrowing' some nice features, e.g.- enums/switch (their design looks interesting)- typealias- tupples / destructuring- replto name just a few.-g.
There is no need for panic, just because Apple made a nice presentation the other day.No panic, but maybe we could consider 'borrowing' some nice features, e.g.- enums/switch (their design looks interesting)
- typealias
- tupples / destructuring
- repl
- typealias- tupples / destructuring- replto name just a few.
--
I guess the best way is to complain in the forum and the issue tracker with good reasons.
Who cares about TC52 anyway ?
Apple, Facebook, Mozilla, Microsoft and the Java world have made their decision and Dart is not part of any one's future.
It was one of the initial complaints.
I know no one that would use or dismiss Dart because there is some Ecma specification or not.
AFAIR, Brendan Eich said once that Ecma sounds like a skin disease
and I had not the impression that he attributed any importance to that association.
Actually, important people care about TC52.
In fact the initial complaints from Webkit (eg Safari) and Mozilla was not a new language in itself, but that it was a 'non-standardized' language. With the standards committee closing that issue, these companies will need to seriously look at Dart again, particularly as it is integrated into Chrome and starts giving a boost to applications.
On Wednesday, June 4, 2014 4:26:16 PM UTC+1, Matthew Butler wrote:Actually, important people care about TC52.Who? Are they represented on TC52?
In fact the initial complaints from Webkit (eg Safari) and Mozilla was not a new language in itself, but that it was a 'non-standardized' language. With the standards committee closing that issue, these companies will need to seriously look at Dart again, particularly as it is integrated into Chrome and starts giving a boost to applications.The imprimatur of ECMA will likely have no effect.A commitment by Google that the Dart VM is going into the heart of it's own platforms - Chrome, ChromeOS and Android - so that it flies on touch with modern web technologies - will make people pay attention. Because of Google's market share.
Apple are totally committed with Swift. They laid out what they doing. It's going to be core to their platforms, no questions asked. (Whether Swift v1.0 will be released with a MIT licence as part of Clang/llvm I don't know.)
K.
I honestly couldn't say if they're represented on TC52 or not.
Which is being done. But if it was shipped when Dart was not a standard then immediately we see what we had when Dart was first announced, that Google is trying to fracture the web and implementing non-standard features that others cannot/will not implement not being a standard.
Apple are totally committed with Swift. They laid out what they doing. It's going to be core to their platforms, no questions asked. (Whether Swift v1.0 will be released with a MIT licence as part of Clang/llvm I don't know.)Sure, but being as I do not have apple products I'll never run a line of code of it. Dart's platform however it the web which runs on Apple, Android, Windows Phone, Linux, Windows etc. etc etc. Google's platform is the web. It's where gmail resides, it's where AdWords resides. They didn't ship a 'chrome only' AdWords, just as the didn't ship an Android Only Gmail. But that's exactly what Apple is doing.
On Wednesday, June 4, 2014 5:55:37 PM UTC+1, Matthew Butler wrote:I honestly couldn't say if they're represented on TC52 or not.OK. Who *is* on TC52. Is there a list somewhere?
OK. Who *is* on TC52. Is there a list somewhere?Apart from Chaiman and Secretary I'm not able to tell. I believe the members list is restricted to members only access (but being as I'm not part of Ecma Group or this TC in particular i couldn't say for sure).
I confess that I found the string interpolation syntax with "abc\(name)def" kind of neat. :-)
K.
Eventually, I'd like Dart to have something like http://worrydream.com/#!/InventingOnPrinciple
You can follow my progress on Google+, for example: https://plus.google.com/104729279175870053531/posts/eGdSfRjMM26
Cheers,
PeterOn ons. 4. jun. 2014 at 4.44 AM, Jacob Goodson <submissio...@gmx.com> wrote:It does have interactivity(playground), which Dart is supposed to have some day...
On Tuesday, June 3, 2014 9:37:56 PM UTC-4, Monty Rasmussen wrote:An Apple-only language? Pass.
On Wednesday, June 4, 2014 9:23:06 AM UTC+1, Ladislav Thon wrote:Oh come on, this gets really old. This is a language designed for large applications and teams -- a little bit of discomfort in scripting situations is a good price to pay (note that the focus is on little here).Dart's language designer seems to prefer:- function return types on the rhs with '->'- no 'new'. Maybe 'const' as a modifier for immutability.- val/let instead of 'final' for immutable bindings (if not immutable by default)- elements of Scala syntax (if not Newspeak)Possibly Scala/C# 6.0 primary constructorsThis gives something both parsable/toolable and easy on the eye:class Point(int x, int y);
myfunction(int a, int b)-> Point {
var x = a;
let y = b;
return Point(x,y);
}
// n.b this is apart from whether type annotations should be rhs (with or without a colon).The interesting aspect of Dart is the core semantics with a new runtime to compete against the JS, Java and Dotnet VM's that dominate the landscape. The syntax is almost incidental - but why obscure the semantics under Java-isms? The Swift syntax was a reminder of a missed opportunity.K.
--
I think a lot of you are looking at this wrong - there is no competition between Dart and Swift. They serve completely different markets. Nobody will be choosing between Dart and Swift for a project for the foreseeable future.
Someone made the following comment on the HN thread about Swift"Worth noting that one of the greatest problems in software development is concurrency support and its ease of use/robustness. It is a critical and growing issue.
You start to sweat things that make little difference when you should be concentrating on getting your product finished. Leave the sweating to the language connoisseurs on reddit - they seem to have little else to do.
--
It took Java that long because:
- Managers decided what the masses want by listening to some of their customers about what they thought they needed.
Most people think they do not need something because they have never put it to good use.
I wonder how much Gilad is in the driver seat this time with Dart.
- The could not decide on good syntax.
Something that appears not important to some when I read this discussion.
IMO, Java is out of favor because of cumbersome syntax and not because of technical efficiency and static types.
I watched a talk from Bjarne Stroustrup: http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014/Keynote
And AFAIR he said at some point that customers and committee want cumbersome syntax for new things until next year when they have learned the concept.
Besides, Sun they tried ISO and Ecma but withdraw both times and kept the defacto standard model.
Since 1998 Java has the community process.
Am Freitag, 6. Juni 2014 02:35:34 UTC+2 schrieb Greg Lowe:
I have gotten caught up the "superiority" of print "hello world" in the past. The next big language will prob not be a language at all but a run-time; one that makes concurrency as naive as garbage collection is now.
--
Dne úterý, 3. června 2014 18:48:52 UTC+2 kc napsal(a):On Tuesday, June 3, 2014 11:31:36 AM UTC+1, Ladislav Thon wrote:This is really cheap. This is how javascript kiddies compare their languages. We, grownups, at least look at language features.The point re 'final/new' is that Swift made the right syntax call. Whereas Dart stuck with a core Java-ism, which turns away potential developers. Especially scripters - kiddy or otherwise.Oh come on, this gets really old. This is a language designed for large applications and teams -- a little bit of discomfort in scripting situations is a good price to pay (note that the focus is on little here). Also, please compare
class Point(x: Int, y: Int)
fun getPoint(x: Int): Point {
var y: Int
y = a * 2
return Point(x,y)
}
val pt = getPoint(1)
On Wednesday, June 4, 2014 9:23:06 AM UTC+1, Ladislav Thon wrote:
Dne úterý, 3. června 2014 18:48:52 UTC+2 kc napsal(a):On Tuesday, June 3, 2014 11:31:36 AM UTC+1, Ladislav Thon wrote:This is really cheap. This is how javascript kiddies compare their languages. We, grownups, at least look at language features.The point re 'final/new' is that Swift made the right syntax call. Whereas Dart stuck with a core Java-ism, which turns away potential developers. Especially scripters - kiddy or otherwise.Oh come on, this gets really old. This is a language designed for large applications and teams -- a little bit of discomfort in scripting situations is a good price to pay (note that the focus is on little here). Also, please compareYou used to be the biggest Dartisan around. Looks like your new love is Kotlin.
Let's have a glance at Kotlin syntax:class Point(x: Int, y: Int)
fun getPoint(x: Int): Point {
var y: Int
y = a * 2
return Point(x,y)
}
val pt = getPoint(1)Syntax features:- succinct immutable binding syntax 'val'- no 'new'- class primary constructors (also in C# 6.0)- type annotations on rhsThis syntax - *not* the full-on type system of Kotlin (or Scala) - also fits in with the underlying theory/semantics of Dart. Would help make the sale that type annotations are *just* annotations.There's a reason Kotlin, Swift, Rust, Scala, TypeScript/ES6 are moving in a certain direction. How can Swift - an AOT native language - have, in some respects, a lighter, richer syntax than Dart.
For example, I hate constructors in Kotlin and I strongly believe that the only language that got constructors right is Dart. (I still don't understand how can anyone consider class Point(var x, var y) readable, and even explain it like "you know, the class is like a function...", which is an explanation that works surpsingly well for generics, an entirely different topic.)
I also hate the need of the fun keyword -- I shouldn't have to write that. Compare:fun main(args: Array<String>) {println("Hello, world")}withmain() {print("Hello, world");}Who's succint now?
I also don't think your purely syntax-based comparison is valid.
I mean -- for me, the things you are so passionate about are nothing but fassion. I'm not interested in that,
LTP.S.: I also used to be very passionate about left-hand side vs. right-hand side type annotations, back in the days when I first moved from Pascal to C. I've grown a bit since then.
P.S.: I also used to be very passionate about left-hand side vs. right-hand side type annotations, back in the days when I first moved from Pascal to C. I've grown a bit since then.It's not so much lhs/rhs. It's that Dart's current Java/C type annotation syntax encourages over-annotation especially on locals. And given Dart's optional/pluggable approach to types and the fact that in Dart everything is an object which has intrinsic security properties it unnecessarily encourages developers to sweat the types.
Does it? Last time I checked, it was a convention in the Dart land to avoid annotations on locals, just like in languages with local inference (Scala, Kotlin, Swift?).
This, IMHO, strikes the best balance -- types makes a lot of sense on API boundary, not that much inside the implementation.
The problem of "final", other than the word is too long, is that it has some implicit exclamation mark attached to it (like someone saying: watch out, this thing is final!). It draws too much attention, which is not deserved because most of the things we declare are "final".
> mandatory "new"There's a bug for optional new/const:
I've heard one complication for making new optional is it's required in the grammar so that you can add generic type parameters to constructor calls.
But if generic functions are added this problem would go away I guess.
--On Sun, Jun 8, 2014 at 7:39 AM, Alex Tatumizer <tatu...@gmail.com> wrote:I think most of archaic features in dart stem from "familiarity" principle. Other languages moved on, Now declaration syntax, mandatory "breaks" in switch statement, mandatory "new" already look slightly outdated.But things don't stop here. Probably same principle of "familiarity" (the meaning of which is a subject of speculation) dictated the preference for declarative frameworks like angular - weird, amateurish attempt to enhance HTML by building a clumsy programming language on top of it. Is this a right way to showcase dart? If dart is not good enough to formulate API for UI programming, then what's the point of the language? Angular+javascript is not much different from angular+dart anyway, it's still the same cake, why would anyone want to switch?Naturally, polymer follows in footsteps of angular, trying to define yet another language. And to those curious when to use which, the advice is to use BOTH (!). Plus dart, compiled to javascript.This angular thing is something that disappoints me much more than slightly outdated syntax.
--
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
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.
On Monday, 9 June 2014 16:49:44 UTC+1, Alex Tatumizer wrote:The problem of "final", other than the word is too long, is that it has some implicit exclamation mark attached to it (like someone saying: watch out, this thing is final!). It draws too much attention, which is not deserved because most of the things we declare are "final".I like that "attention". When in Scala, I very often mistake "val" for "var" (or vice-versa). "Final" makes it more explicit.Coming from AS3, I like the "var point:Point" syntax, rather than C-style.There will always be diverging opinions on every detail.
var x = 1; // mutable
let y = 2; // immutable
var x:int; // mutable with annotation because no initializer
I agree with a few comments upwards ... In the end, these details don't matter. I'm not less productive because of them.
Linked topic : please vote (star) this issue if you are interested in building Android native apps with Dart : http://dartbug.com/19266