EDIT: gandi.net looks like the best bet if anyone else needs both .me and .it.
238 karma · joined June 30, 2010
EDIT: gandi.net looks like the best bet if anyone else needs both .me and .it.
In essence, I'm agreeing with everything you said, just wanted to clarify the reason for my post.
So am I not a real developer because it took me longer than a week to get a hang of Haskell? Hell, it even took me many months before I understood JavaScript well enough to find the right mix of patterns and practices to write solid code in it.
On the other hand, when I was searching for a new position some 7 to 8 months ago, the few python places here seemed to have unrealistic expectations of their applicants.
I've given F# a try recently for some of those tasks, and while it certainly is very capable of accomplishing them, I've found that using the .NET libraries, or having to expose my own APIs to C# developers in a way that will be natural to them, often leads me to simply writing C# with F#'s syntax. This is certainly no worse than having done so in C# directly, but the core ideas behind functional programming just seem to get diluted. On a side note, I think that with a bit of more design in mind, it should be possible to at least keep the core components 'functional' and then just have a middle layer that defines the classes and handles interop so your code can then be used from C# in an OO way.
try
let rec func ... =
...
func( ... )
let result = func( ... )
with
| ex -> ...
I don't know exactly how I ended up thinking that, seems a bit silly in retrospect.Reading that just kind of made me break out into a cold sweat. I imagine I will be looking at some IL tonight because of this.
I still don't quite get the reason for why try-catch or try-finally blocks cannot have a tail call in them?
If anything, I think the awful slideshow "player" UI on this website did a better job at explaining the lack of "invisible design" than the slideshow did. I spent almost a minute trying to find a play button, because from the look of the UI I was expecting a movie. When I hit the fast forward icon I thought it just took me to a preview screen for another unrelated video.
I understand how that may seem like an overreaction given that we're used to losing more time on more meaningless things, but a good UI should only take a split second to understand.
Or perhaps the hope should be to make more "effective" free software instead of having ill wishes towards your competitors. I mean, Stallman can really preach about free software all he wants, but most people in the consumer world probably wont turn down a superior closed source product based on that merit alone. The biggest factor in deciding winners or losers here is the quality of the products being created by the two methodologies, and I am yet to be convinced that the free software approach consistently creates the better product.
Read the abstract: http://appft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sec...
> No it isn't. Instead I would say that the JVM, which took ages to release version 7 (and we'll probably wait another 2 years for version 8), is light-years ahead of .NET
...
> while the DLR is somewhere in limbo
...
> Btw, speaking of Java's garbage collector, it's so kick ass that no other VM comes close.
...
etc
I didn't downvote, but saying stuff like that without a single bit of concrete information to back up the those arguments is pretty useless.
Then you have:
> Personally, I consider it a lot more awesome when some dude I never heard of appears from nowhere with a usable LISP implementation (Clojure).
Which disregards that non Microsoft employed people create languages for .NET too. Nemerle is a great example, and that's how the Iron projects initially started before MS got involved.
and also:
> The fact that .NET is only usable on Windows has been its major flaw since for me ever since I heard about it. It might as well be the most awesome technology in the world (although that would be a stretch of imagination), but it's completely useless if I can't run it wherever I want.
Which is just almost ignorant. I used to be employed writing ASP.NET web apps that ran on linux servers before I switched jobs. Then you have xamarin which lets you develop .NET apps for iOS and Android. Needless to say you get that ability automatically for Windows phones, etc. So all in all to me it seems like .NET's reach is pretty impressive.
You say XHR was a good idea, and it's clear now that reverse engineering it and putting it into Mozilla's browser was a good move because it allowed that technology to advance the web -- but at the same time you are showing opposition to taking a similar course of action for a Dart VM because it's not an open standard.
I understand the viewpoint that you would rather have had Google focused on improving JavaScript through Ecma TC39 than creating another language with absolutely no outside influence. I also admit that this is a pretty inconsiderate move for them to make, especially as that email made it sound as this new language aimed to be a "replacement" for JS. But despite the lack of good will behind this action, I would still hate to see something as rare as a new client side language, that has a decent potential of allowing developers to think differently about solving problems on the web, die off because no one wanted to adopt it.
> It's my hope (for that's all I can do right now...) that some of the great minds at Google actually hashed out some of the issues from js, put down a formal specification and created the new language that's "like js", but better.
I disagree with this mostly because I had hopes for a fast lightweight VM that could at least support multiple languages. Now that it's clear we're not going to get such a VM, I'd at least hope that we get something as far away from JavaScript as possible. If you want "like js", then just use JS as the compilation target for the language like CoffeeScript does, but make it suitable to a different side of JS than CoffeeScript. For example, a language that is better at functional programming, to contrast Coffee's OO favoring approach. It could still be JavaScript like and implemented on top of it without major complications (maybe a lack of tail recursion 'optimization' might be a problem?)
But as for Dart, I'd rather it be something that doesn't translate to JS very well, so that we at least have a broader range of what can easily be done in a browser. Of course I realize that this probably wont be the case since they already claimed it would be a dynamic language with only optional type checking. At this point I'm just hoping it will be re-branded newspeak, because honestly, that would be a pretty interesting language as an option. Plus with Bracha doing Google Tech Talks, his language fitting the description fairly well, and his blog posts talking about a Newspeak -> JS compilers in recent months, Dart might actually have a chance of being Newspeak in disguise.
EDIT: By the way, I don't think Jash Kenas being more familiar with language design would have made CoffeeScript any different/better than it is. A big part of its success is that it's just a more modern day JavaScript, and the core design of JS wasn't really affected very much (scoping being the biggest change I think). This allows the generated code to be easy to read, and makes learning CoffeeScript fairly quick. I think both are major factors in CS getting so popular so quickly.
Oh, and as I recall, he did a great job of taking input from other JS developers through out CS' development process. So it's not really like he locked himself in a basement and created the whole thing by himself. In fact, he probably did a much better job at this than Google did with Dart.
Also, there's really opposition of having it implemented in other browsers, at least Mozilla vocally opposed it. I think that if they managed to do it via a plugin though, that could work.
Also, another annoyance: .NET is not a language.
I'm not familiar with Java, but in the scenario I illustrated it took 0 lines of your own code to receive a JSON structure, and one line to return one. That's outside of defining the structure itself (creating the class; what I think you mean by "the problem of describing the format"), but generally you'd want to do the exact same thing in a dynamic language to make working with the structure easier. Example: you still define model classes in a Django app.
> ... and how to handle errors where the incoming JSON doesn't match your expected format in some way.
I don't see how you wouldn't have the same exact problem in a dynamic language. You can't just receive input and know magically what to do with it, you need to have the input be in a defined/expected form in order to process it. This to me is outside of dilemma of dynamic vs static because it is a problem in both approaches.
> I suppose you could simplify common cases by determining the expected format using reflection if your language supports it, but that's not going to be powerful enough to cope with the general case without providing some sort of metadata as well.
Right, in the scenario I gave the framework looked at the signature of the controller, saw that it expected to receive an object of such and such type, and told the serializer to use the JSON data to create an instance of that type. I'm not sure what more metadata would be needed to make that work? I suppose if you get a parsing error you can just use the exception handler in your client code because the client submitted data in the wrong format, etc.
> In short, I'm still waiting to find a library that can parse arbitrary incoming JSON within a statically typed language without at best requiring the programmer to repeat structural information that is already implicit in the code that uses the resulting object.
Defining a class once and saying you expect to receive an instance of it is not "repeating structural information" in my opinion. I can only see it as being "repeated" if you look at the initial JSON data structure as sort of the type itself. I personally look at the role of JSON to be a "data container" and not a "structure descriptor", but if that's the way you like looking at it, well then yeah, dynamic typing is going to be your best bet right now. The closest I can think of is Haskell's type inference which constrains types based on how they're used in the function, but even then the types have to be defined at compile time, and it will not just create one for you that matches what you're trying to do at run time -- it just accepts already defined ones based on whether they meet the constraints gathered from the code.
Perhaps you would if Python or Ruby were used more often for, and I hate to use this term, "Enterprise" type applications -- especially ones that have teams with 50 some developers. They're not though, and they're probably not for the fact that they're dynamically typed and that often causes chaos when there's that many people involved and communicating with them becomes a job in and of itself. The more you have to spell out things in your code the less likely another person will misunderstand its meaning.
Anyway, I personally would still prefer a statically typed language just for the added compile time safety. To me the "save + refresh browser + manually check if change works" process of development is way more tedious than having to work with type constraints that fail to compile if they don't make sense. That and decent type inference really helps in 90% of the cases where static typing seemed tedious to me.
Perhaps I'm not sure what you mean exactly, but I've been using frameworks and tools that handle JSON de/serialization for years now. For example, whenever building applications in ASP.NET MVC and ExtJS on the client side, I would use a project called Ext.Direct.MVC. All that does is set up a handler that automatically grabs specific types of requests, converts the JSON data in the request to an instance of a model, or any data structure that you expect to receive, and passes that created instance over to your controller automatically for you. So on the client you just call the controller with some JSON, and on the server you declare a controller that receives an instance of one of your defined models. That's it, you're done. The only time you'd have to so much as interact with the JSON serializer is when you wanted to return some data like a model -- but all this means is wrapping the model you're returning in a call to the JSON serializer and you're done.
Also, if your selection of languages/frameworks does not offer a tool like this, it likely does offer enough sub-components for you to be able to create a system like that in a day or two. EDIT: (or perhaps I am just making a bold claim here assuming that all language communities have at least one JSON serializer/parser as awesome as Json.NET).
In my personal opinion I'd actually say the opposite of you and claim that often times a language's type inferencing could be better. It's certainly not perfect in C# (not when compared to Haskell, or even F#), and I'm not even sure if it exists for Java.