Haven't posting much of late but I've been busy on my project. Have now pretty much translated all of my Ruby project now into Dart. Ruby about 5,000 lines, Dart some 6,200 lines and maybe 600 more coming to finish. Generally I'd say I've had maybe 4-5-6 things just really seem to "let me down", and of these issues the inability to execute even a a single small chunk of script (like just an assignment to a new variable) is my #1 'gripe'. Dart can gets me right to the point where I
could be implementing a low maintenance/self adjusting design but without being able to make "dynamic assignments" I come up short in several ways. Have tricked the system into working somewhat with the noSuchMethod method but overall this is not as nice a solution - for example it requires a Map fetch for each use of the variable (which becomes a method call) rather than allowing it to be shoved into the environment. It has been really a irritating step
backwards for me to have to write "Invoking methods" with big ugly case statements (virtually banned from my Ruby work for years) because these will 'break' with the slightest change to a method name. Turns my positive design feature into a poor design. My otherwise Dynamic / self-adjusting design comes up short while in Ruby it simply executed whatever methods it found (no muss, no fuss).
So #1 is clearly my #1 gripe on Dart after several months of this work. No #2 above is tricky because, in my case, I want to load the result of executing a block of code into "the environment of the calling class". Not a computer scientist and unsure how to suggest this, and perhaps this is doable with the 'Expando' feature, not sure, but perhaps a dynamic assignment statement could be allowed? I do other-things in other places and it is a centerpiece of one of my best pieces of code every imho that I could execute whole blocks of code, but this would cover some 50% of my use and get me over the immediate dilemma.
Overall not so unhappy, excited even, but this lack of being able to fetch the response from a method dynamically is cramping my style! Oddly enough, I have shared this with some folks that know Dart better than I do and they have not, I suspect, caught on to the "trick" that we Rubyists have known and used for years. Not, honestly, that I know many Ruby-ists, but the top notch ones I knew consider switch statements really bad style...
Also, with the mediocre dynamic solution I did come up with, the best I could do back 2 months ago or so, came up short in that I needed to assign the results of a method invocation to a global, then read the global because fetching the result of the method did not seem possible. I also consider this a major missing feature - but it seems likely this hole has been plugged?
Again, however, I'm not unhappy overall, as an old desktop applications guy I am excited as heck to be able to work in a single language. I'm hoping to not remain a team of one, but I think it is "revolutionary" in Web evolution that the same code from a single "real" language will run in the Browser and on the Server! That's major, and this other stuff, well, will take time.
Now that I have pretty much duplicated the functionality of the Ruby Project I am allowing myself to think about all the powerful things that I can implement into my own set of Graphical (Control Statistical, generally) charts and the ideas keep coming!
BTW, one side-note, I have rather reverse-engineered the Ruby "Prawn" (pdf) Gem into a rather cute little Dart Library (of 2private classes and one public). It uses HTML5 canvas to do into the screen work that this package did into a displayed PDF file. All based on some 14 canvas methods. Its satisfies all my immediate needs with minimal overhead for my project (including some really basic text grid features). No idea whatsoever if this library would have value to other Dart Programmers.
Also at some point, before too long, I'd love to have a short chat with a Google guy to see what might make sense in the future for my project, I'm at an interesting design decision point, and have pretty much zero experience with hosting Web applications.
Happy New Year to all!
_swarmii