Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #7319
| From | dhtml <dhtmlkitchen@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Google Dart Released Today |
| Date | 2011-10-12 21:04 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <76c7cd5e-be68-45a1-b3d9-e0e53bd21c7e@z14g2000prk.googlegroups.com> (permalink) |
| References | <cb47d781-dc6b-4e5b-9ccb-6e1d18edcf3b@l30g2000pro.googlegroups.com> <j75g1d$u72$1@dont-email.me> |
On Oct 12, 6:48 pm, Matt McDonald <m...@fortybelow.ca> wrote:
> On 10/10/2011 11:44 AM, dhtml wrote:
>
> > Dart is a new language by Google with new syntax and new operators.
> > [...]
>
> Aside from the supremely bloated language, what I found most concerning
> was the DOM interpretation Google are implementing.
>
> I picked up the following link from Twitter today:http://www.dartlang.org/articles/improving-the-dom/
>
> The first folly begins in the third section entitled
> "Better querying". It seems that the myriad of NodeList-fetching
> methods and HTMLCollection-fetching properties are too verbose,
> and not expressive enough. The solution? Why, CSS-style querying,
> of course! Certainly, nothing beats a square peg lovingly jammed
> into a triangular hole. The religious blurb in the jQuery paragraph
> says it all, really.
>
> Next up, we have a "collections" section. Here, the Dart team
> have implemented an HTML 5 classList API, except using attributes.
> What a nice way to remind developers of the (ir)relevance of
> attributes.
That would be true only if they are clear about the difference between
attributes and properties. It is a disturbingly common mistake, and
particularly so after all the noise on this NG and after that long
article I wrote.
Again, we should see some code. Somebody go download this thing and
make a gist, etc.
[...]
> Now, on to DOM element construction. Dart's DOM improvisations
> propose drudging up the Element constructor.
The syntax difference is minimal to me. I don't mind much either way
of:
| document.createElement("div");
| new Element.tag("div");
Though the latter starts with "new". The only problem with that is
that they have now to create some unnecessary delegation. They
possibly have to contend with error propagation where createElement
throws.
Given a standard and wide browser support for `new Element.tag` sure,
that'd be fine, but that is not reality. Just
`document.createElement("div")` works.
Thought that was
> bad enough? How about a jQuery-inspired innerHTML wrapper?
> Nothing beats kludging through strings instead of nodes!
>
That's not a bad idea for a spec proposal, per se, but like with `new
Element.tag` it isn't natively supported or specified anywhere except
by Google. This means an additional abstraction layer is required
(Dart DOM library), and that must be downloaded, interpreted, run by
the device, and stepped through when debugging.
The jQuery wrapper tries again to do something general with innerHTML
and innerHTML has a lot of quirks. That's not to say innerHTML is bad,
but it is wildly inconsistent. The other problem with the way
`jquery.buildFragment` is designed is that it uses overloading and
typechecking with using host objects. That doesn't work.
But what is inherently wrong with building HTML fragments with
strings?
http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/6f97e834996670c3
--
Garrett
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar
Google Dart Released Today dhtml <dhtmlkitchen@gmail.com> - 2011-10-10 10:44 -0700
Re: Google Dart Released Today "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-10 14:24 -0700
Re: Google Dart Released Today dhtml <dhtmlkitchen@gmail.com> - 2011-10-10 22:36 -0700
Re: Google Dart Released Today David Mark <dmark.cinsoft@gmail.com> - 2011-10-10 23:41 -0700
Re: Google Dart Released Today "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-11 05:33 -0700
Re: Google Dart Released Today dhtml <dhtmlkitchen@gmail.com> - 2011-10-11 14:06 -0700
Re: Google Dart Released Today Swifty <steve.j.swift@gmail.com> - 2011-10-12 07:13 +0100
closure bindings (was: Google Dart Released Today) Andreas Bergmaier <andber93@web.de> - 2011-10-11 23:56 +0200
Re: closure bindings (was: Google Dart Released Today) David Mark <dmark.cinsoft@gmail.com> - 2011-10-11 16:20 -0700
Re: closure bindings Bwig Zomberi <zomberiMAPSONNOSPAM@gmail.invalid> - 2011-10-12 15:02 +0530
Re: closure bindings Antony Scriven <adscriven@gmail.com> - 2011-10-12 05:12 -0700
Re: closure bindings dhtml <dhtmlkitchen@gmail.com> - 2011-10-12 18:27 -0700
Re: closure bindings Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-12 13:24 +0200
Re: closure bindings "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-12 08:56 -0700
Re: closure bindings Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-12 21:15 +0200
Re: closure bindings "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-12 15:21 -0700
Re: closure bindings Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-13 20:56 +0200
Re: closure bindings Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-13 21:36 +0200
Re: closure bindings "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-13 16:41 -0700
Re: closure bindings dhtml <dhtmlkitchen@gmail.com> - 2011-10-13 22:39 -0700
Re: closure bindings "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-14 09:03 -0700
Re: closure bindings Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-14 20:05 +0200
Re: closure bindings dhtml <dhtmlkitchen@gmail.com> - 2011-10-12 18:38 -0700
Re: closure bindings Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-14 23:34 +0200
Re: closure bindings dhtml <dhtmlkitchen@gmail.com> - 2011-10-14 16:56 -0700
Re: closure bindings Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-15 02:44 +0200
Re: closure bindings dhtml <dhtmlkitchen@gmail.com> - 2011-10-14 21:18 -0700
Re: closure bindings David Mark <dmark.cinsoft@gmail.com> - 2011-10-12 18:28 -0700
Re: Google Dart Released Today Antony Scriven <adscriven@gmail.com> - 2011-10-11 15:13 -0700
Re: Google Dart Released Today dhtml <dhtmlkitchen@gmail.com> - 2011-10-11 22:33 -0700
Re: Google Dart Released Today Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-12 07:27 -0700
Re: Google Dart Released Today dhtml <dhtmlkitchen@gmail.com> - 2011-10-12 18:29 -0700
Re: Google Dart Released Today Duncan Booth <duncan.booth@invalid.invalid> - 2011-10-13 08:21 +0000
Re: Google Dart Released Today Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-13 04:46 -0700
Re: Google Dart Released Today unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-13 14:03 +0200
Re: Google Dart Released Today Duncan Booth <duncan.booth@invalid.invalid> - 2011-10-13 12:40 +0000
Re: Google Dart Released Today unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-13 17:51 +0200
Re: Google Dart Released Today Duncan Booth <duncan.booth@invalid.invalid> - 2011-10-13 13:31 +0000
Re: Google Dart Released Today Duncan Booth <duncan.booth@invalid.invalid> - 2011-10-13 15:17 +0000
Re: Google Dart Released Today Karl Tikjøb Krukow <karl.krukow@gmail.com> - 2011-10-14 13:02 +0200
Re: Google Dart Released Today dhtml <dhtmlkitchen@gmail.com> - 2011-10-14 12:36 -0700
Re: Google Dart Released Today Karl Tikjøb Krukow <karl.krukow@gmail.com> - 2011-10-15 19:30 +0200
Re: Google Dart Released Today David Mark <dmark.cinsoft@gmail.com> - 2011-10-10 22:23 -0700
Re: Google Dart Released Today Matt McDonald <matt@fortybelow.ca> - 2011-10-12 19:48 -0600
Re: Google Dart Released Today dhtml <dhtmlkitchen@gmail.com> - 2011-10-12 21:04 -0700
csiph-web