On Leaky Abstractions and Objective-J(cappuccino.org) |
On Leaky Abstractions and Objective-J(cappuccino.org) |
Having said that, I still maintain some skepticism about using a single language for the entire webapp stack. I understand their desire, for example, to be able to swap out the "rendering layer" in the future. However, CSS is a pretty good language for specifying how things should look across an entire web site, or part of a website, or single page, etc. I don't think Objective-J is a better tool for this particular job. Likewise there may be times when you just want to express structural relationships, and HTML might be better than Objective-J for that purpose (less sure about this one).
I don't know the details about Objective-J. Maybe they address this point elsewhere. The counter argument may be that Objective-J is for "rich web applications," and you don't worry so much about site-wide CSS style in that case.
For web-pages i agree with you that traditional html/css is sufficient in most cases.
I think this Objective-J is the wrong thing.
What does burning money have to do with anything? Cappuccino is an open source project. 280 North is a 3 person company.
This is really pointing back to the old "Cathedral vs. Bazaar" dichotomy.
Objective-J's code importer is one of the more complex pieces (as it manages to do so completely asynchronously). All the approaches that use a simple JavaScript function to grab code, like grab_and_eval("file.js") are forced to happen synchronously (since you have to guarantee that the code is evaled before the next line). Without some sort of lexing support, its really not possible to both grab files asynchronously and also be able to continue executing.
Also, as stated in the article, you can't intercept JavaScript method calls, so if you want something like method missing you're forced to do something like:
call_method_or_send_method_missing(object, "method_name")
And again, since Objective-J is a proper superset of JavaScript, it doesn't lose any of its powerful features.
really? what can it do that js can't do?
I don't understand how you can say that, when the entire article is a defense of why they added a bunch of features to Javascript as a library. That is, as opposed to adding those features as part of a new language specification.
I think the actual argument is "as long as you are adding language features as a library, you might as well introduce new syntax for them while you're at it." They present several arguments in defense of this claim.
But, with Objective-J you can write for example, some math library that has nothing to do with Cappuccino and not load Cappuccino.
Even with LISP, I am not sure if I am so happy about the new trend to add syntactic sugar. Having just brackets is pure, in a way, throwing in square brackets makes me feel a bit uneasy (not that I am much of a LISP specialist, so maybe my judgment is completely off base).
Mechanics have wrenches with the edges ground off or thinned down, even heated and bent to fit special applications. So why shouldn't I have my own syntax which sits on top of a readily available platform?
I guess I don't like more and more "special signs" (like @, [], <>, #) invading the code.
I've witnessed it with Java where a lot of new syntax was introduced. The thing is, these are all new concepts adding to the complexity of the language (annotations, generics,...). I prefer to keep things simple.
I feel like there is some terminology confusion here (I already replied to someone else in the same vein).
I think it makes more sense to say "I prefer libraries that do not introduce syntactic language changes to ones that do." Technically, I would say Objective-J is a Javascript library, in addition to being a language in and of itself.
I think that Prototype, jQuery, etc. also add some syntactic changes, so I would say the difference is one of degree, not of kind.
My standard: Can a common JS interpreter (say firefox) execute the code without modifications?
If that is true, then said "thing" is a library.
my guess is that objective-j is DOA. the pool of objective-c programmers is not a motivating factor...i'm not even sure there are many people who really love objective-c. indeed i would offer that the "leaky abstraction" is that which tries to graft one so-so language on top of another so-so language. just man up and use javascript for what it is.
On top of that, you seem dedicated to the argument that Objective-C is a bad language, and that Objective-J is silly for wanting to re-implement it. Of course, as mentioned in the post, that was in no way the goal of Objective-J. The actual language isn't the point.
Separately, Objective-C is a great language, and plenty of people love it. More every day thanks to the iPhone. Can you give me three reasons why you don't like it?
Finally, claiming OO programming is dead is nonsensical. Java is by far the world's most popular programming language. Right below it you'll find C++ and C#. Three strictly OO languages. Not to mention the fact that two of the three most popular JavaScript libraries build in classical inheritance.
so much so that its almost impossible to find it being put to use outside of places apple forces it. and before you say "gnustep"...no one uses that
Can you give me three reasons why you don't like it?
1. goofy/eyes-bleed syntax
2. i don't care about OO
3. i'll think of something later
Finally, claiming OO programming is dead is nonsensical. Java is by far the world's most popular programming language.
java is a ployglot language. they're busy now trying to turn it into a hybrid-functional language...just like c#, the other kitchen-sink language
and c++ was designed from the ground-up to be multi-paradigm, this is all over everything stroustrup says about it
As it happens, the javascript language is incredibly flexible and expressive. Maybe we in the js community should man up and accept that there are many ways to skin the DOM cat. They may look rather different from one another, but they're all javascript.
to be honest, i see the basis of objective-j born from some notion that apple does things right so naturally we all want to do things they way they do...but objective c sucks (having coded in it), and i have no idea why people would want to muck up another stack by pasting objective c onto it
I would not consider SVG as an option or necessary except if you are a building an well targetted network app served over the web.
Burning "money" is valid when you can't afford it. For a startup that "money" is the effort. So it's more important for a group of 2 or 3 to solve real problems.
YouOS, a team of smart guys got busted for getting caught in wrong execution.
I have looked through some of the code for parenscript and although I'm not a lisp expert I could grok what it was doing. I could also see how I could write my own macros if I put my mind to it. One huge advantage of compiling to js is that it makes obfuscation and compression a lot easier (this is true for GWT, objective-j, pyjamas, and parenscript).
Which demonstrates how successful Brandon Eich was when he set out to make Javascript a Lisp-like language.
"There is also the issue that implementing things like method_missing and import are prohibitively difficult without new syntax."
TeX macros are fundamentally as expressive as java.
The word "apple" DOES NOT APPEAR IN THE ARTICLE. (I just checked.) Please, read the article and reply to the very thoughtful points made there. Ascribing some vague, unsubstantiated motives to people who have carefully laid out their entire reasoning behind their decision does not reflect well on your ability to engage in substantive discussion.
It's really quite elegant if you think about it. It's a highly dynamic language that was designed more than 20 years ago and is still very relevant today as the platform of choice for developing nearly all Mac OS X and iPhone apps. As far as dynamic languages go it's very fast since it's compiled. It integrates seamlessly with C (and even C++).
Just because you don't know or care about Objective-C doesn't mean there aren't plenty of people who do. I regularly see articles about Objective-C on the front page of Hacker News, Reddit, etc.
Therefore although their effort with what they call Objective-J may be worthwhile, it's certain it will never go mainstream.
One significant reason? It runs toooo slow on IE. IF it ever gets fast, maybe more people will give it a shot.
And it's certainly not stopping people from writing apps. There's now more than 10,000 apps on the iPhone App Store alone.
This is almost always an indication that a programming language critic has nothing really thoughtful to say. Same with Lisp and S-expressions.
If I may paraphrase: "It's slightly different than what I'm used to, therefor I despise it."
"impossible to find it being put to use outside of places apple forces it."
That's a huge caveat. iPhone development is extremely popular. Maybe the point is that people just put up with Objective C in order to do iPhone/Mac development. But I don't think that is true. NextStep had a small but rabidly devoted following, and part of that was because they really liked Objective C. Apple tried Java bindings to Cocoa at one point, but found everyone used Objective C anyways.
In general, I think it's true that most developers don't know much about ObjC until they want to develop for iPhone/Mac. But once they learn it, they tend to like it, from what I can tell.
i didn't mention lisp or s-expressions. of course taste is subjective, but the "objective c is fugly" meme has lots of adherents
oh come on, it is well known that apple intentionally dragged their feet on their java support for years
probably because they realized that as gross as java was, very few people would bother with objective c if they could get first-class support for java on cocoa
Apple (or more, exactly, the part from NeXT) did initially bet a lot on Java adoption. They ported the entire WebObjects stack from ObjC to Java, only to watch the technology get abandoned by those in the banking and eCommerce communities. The conversion was so total that when the Cocoa-To-Java bridge in OS X was deprecated, it was no longer possible to continue using the original WO tool chain. (What WO development outside of Apple exists made a new chain based on Eclipse, from what I read.)
It works surprisingly well, but you can't and won't believe it until you try it yourself.