TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

116 pointsby bobrenjc93about 13 years ago

30 comments

georgemcbayabout 13 years ago
Opa is neat, but the two license options of AGPL or "talk to us for a price" basically ensure it will never achieve anything close to mainstream usage.
评论 #3931832 未加载
评论 #3931750 未加载
评论 #3932986 未加载
评论 #3931945 未加载
评论 #3933406 未加载
adam-fabout 13 years ago
I actually tried to run one of the featured projects on github: OPAcman.<p>This was my experience:<p>1. install OPA. Get surprised by the AGPL license because the main page mentions that it can be used to develop closed source apps.<p>2. git clone OPAcman.<p>3. run make, fail. Read error message (in color, with a little unicode "flag" symbol right where the error is!)<p>4. change makefile to use --parser classic, also fails<p>5. hack off score.opa because --parser classic database directives are irrevocably broken and I can't be arsed to figure out the new syntax, also patch opacman.opa with a stubbed out Score object.<p>6. Run make, get ocaml errors: Error: This expression has type Bsl_init_.CR.t = QmlClosureRuntime.t but an expression was expected of type QmlFlatServerLib.record = ServerLib.ty_record<p>7. Take a look at some of the ml code generated<p>let _v686_const = ((Obj.magic) (((QmlFlatServerLib.unsafe_init_static) ([| (((Obj.repr) (( (* ["label" ; "ty"] <i>) Link_opacman_001._v5_shared_vtable)))) ; (((Obj.repr) (None))) ; (((Obj.repr) (Link_opacman_002._v226_const))) ; (((Obj.repr) (_v685_const))) |])))) let _v687_const = ((Obj.magic) (((QmlFlatServerLib.unsafe_init_static) ([| (((Obj.repr) (( (</i> ["hd" ; "tl"] *) Link_opacman_001._v6_shared_vtable)))) ; (((Obj.repr) (None))) ; (((Obj.repr) (_v686_const))) ; (((Obj.repr) (Link_opacman_001._v8_const))) |]))))<p>8. Run AWAY.
nilliamsabout 13 years ago
If you look at the docs you'll see it's not trying to replace CSS and HTML (thankfully). CSS and HTML are still used. There just appears to be some extra sugar around HTML templating (and it checks your HTML at compile-time).<p>The 'one unified language' therefore just refers to using a single language on client and server, and as it happens it's a JavaScript like language, so simply in terms of languages used it's not all that different to using JS on the client and server.<p>The main selling point of this appears to be strong static typing.<p>Edit: Also yes, glad they are rethinking the licensing.
评论 #3932573 未加载
gosubabout 13 years ago
<p><pre><code> Opa however extends the classical syntax with advanced features specific to the web. HTML fragments can be inserted directly without quotes: line = &#60;div id="foo"&#62;bar&#60;/div&#62;; </code></pre> I'm not sure that this helps readability, feels like reverse php (html inside code, vs code inside html).
评论 #3931757 未加载
评论 #3932528 未加载
maratdabout 13 years ago
My Daddy always taught me, if you try to sit on two chairs, you'll fall in between them.
评论 #3932803 未加载
joe_the_userabout 13 years ago
When I looked for sample code, it automatically transfered me to the tour, which then failed to load.<p>Anyway, the language seems to support all the constructs of the languages it claims to replace - which could easily mean it would be even more confusing than using those languages.<p>Also, I think Cold Fusion is an effort to do a similar thing and has about fifteen years of history. Railo seems to be an open source clone of CFML: <a href="http://www.getrailo.org/" rel="nofollow">http://www.getrailo.org/</a>
pygorexabout 13 years ago
Christ on a cracker. Web browsers don't understand Opa. They understand HTML. They understand CSS. They understand JavaScript.<p>Who do you want on your team? Someone who understands Opa? Or someone who knows what browsers know, in detail?<p>If I know only Opa I'm limited to what the Opa developers know about these technologies. I'm limited by what they know. By mastering these technologies I'm only limited by what I can imagine.<p>Opa is a barrier on my imagination.
评论 #3931878 未加载
评论 #3932050 未加载
评论 #3934147 未加载
stephengillieabout 13 years ago
<a href="http://xkcd.com/927/" rel="nofollow">http://xkcd.com/927/</a>
评论 #3931505 未加载
评论 #3932286 未加载
Sharlinabout 13 years ago
Sooo... Just as people have finally mostly learned that mixing presentation, business and data logic is mostly a Bad Idea, we get a new language that encourages just that, worse than PHP ever did?
评论 #3932214 未加载
评论 #3931837 未加载
评论 #3932209 未加载
Egregoreabout 13 years ago
For long time I was planning to develop a similar language, I'm happy that they did it. Probably they did some things differently than I imagined, but abstracting away the client-server communication is a good thing.<p>For those complaining that it's not MVC - you can build a MVC framework on top of it.
评论 #3931927 未加载
sovokabout 13 years ago
Looks quite similar to Curl (<a href="http://en.wikipedia.org/wiki/Curl_(programming_language)" rel="nofollow">http://en.wikipedia.org/wiki/Curl_(programming_language)</a>), although Curl only runs on the client and needs a plugin. It got a lot of press ten years ago but is now mostly forgotten.<p>Opa runs on the client and server and compiles to JS, so it got that advantage over Curl. But it's still a kitchen sink wrapper around existing technology, from a single vendor. Those seem to never work out that well.
评论 #3931991 未加载
gourangaabout 13 years ago
It's like a Gerber multi tool. You get half a knife, half a pair of pliers and half a screwdriver.<p>One tool for all jobs never works.
kaweraabout 13 years ago
The Links programming language is another project that tried this approach: <a href="http://groups.inf.ed.ac.uk/links/" rel="nofollow">http://groups.inf.ed.ac.uk/links/</a>
candeiraabout 13 years ago
I don't see how it replaces HTML. At most it manages HTML.<p>Also a question: can anybody knowledgeable tell us how Opa compares with Meteor? Both of them seem to follow the approach that any piece of code can run in either the server or the client, either with the system choosing automagically or with the code specifying a 'server' or 'client' directive.
评论 #3931701 未加载
评论 #3932094 未加载
natewareabout 13 years ago
Yay! Repost: <a href="http://news.ycombinator.com/item?id=2925609" rel="nofollow">http://news.ycombinator.com/item?id=2925609</a>
yxhuvudabout 13 years ago
Having HTML as a native type in a language is something I could get behind. Otherwise, no thanks - I prefer specialized tools and languages.
jahewsonabout 13 years ago
Reminds me of Links <a href="http://groups.inf.ed.ac.uk/links/" rel="nofollow">http://groups.inf.ed.ac.uk/links/</a>
Tloewaldabout 13 years ago
Manual is impossible to read when zoomed to fit (won't scroll) on iPad.
评论 #3932093 未加载
评论 #3932251 未加载
pbhjpbhjabout 13 years ago
<a href="http://doc.opalang.org/manual/A-tour-of-Opa" rel="nofollow">http://doc.opalang.org/manual/A-tour-of-Opa</a><p>The tour page above is fubared for me on Opera Mobile 12. The right pane won't scroll and is obscured by a large semi-opaque overlay.
anurajabout 13 years ago
Why only HTML, CSS, JS, PHP? It should be replacing also the recent fads Ruby, Python, Haskell, Clojure and god knows what else. It is high time we have single, elegant solutions. Stacks are so yesterday!
pepijndevosabout 13 years ago
So this is the new Personal Home Page Script?
beefsackabout 13 years ago
Abstraction is not a bad thing.
jrockwayabout 13 years ago
Isn't this GWT, essentially?
ErikDabout 13 years ago
Opa means Grandpa in Dutch.
评论 #3931912 未加载
pjmlpabout 13 years ago
I lost fate on Opa when they decided to drop OCaml and jump on the JavaScript bandwagon.
评论 #3931978 未加载
hk__2about 13 years ago
HTML/CSS are NOT programming language, Opa cannot replace them.
rjzzleepabout 13 years ago
one size fits all, eh? maybe when everyone's obese by default. rings the alarm bells immediately here
wavephormabout 13 years ago
It's a herculean effort. I heard about Opa about a year or two ago, amazed he's still at it. Kind of like Haxe. I doubt they will go anywhere, like Coffescript, because any language that simply abstracts another is just cruft and doomed to be obsoleted.
评论 #3931615 未加载
评论 #3931716 未加载
评论 #3931587 未加载
评论 #3931936 未加载
pyrotechnickabout 13 years ago
Now we can finally get rid of all those pesky DSLs once and for all...
bioliabout 13 years ago
I am curious to know how this re-re-re-re-post has always managed to get to the front page.