Live data from Hacker News

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

opalang.org

51–60 of 88 posts

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

#51
post #17
post #13

Opa however extends the classical syntax with advanced features specific to the web. HTML fragments can be inserted directly without quotes: line = bar ; I'm not sure that this helps readability, feels like reverse php (html inside code, vs code inside html).

It's much more readable than complex combinations of " and '. Furthermore, with the static typing, all your structures are checked at compile time: Try it, you'll see how helpful it is.

Oh yes. The mess of " and '. I'd love to be able to avoid that. Especially for stuff like this:

    ''
Did you notice the bug?

EDIT: Whoops, I made some other bug accidentally.

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

#55
post #15

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.

Agreed, the law of leaky abstractions is pretty brutal. When you're writing serious systems you always have to peek under the hood -- e.g. you have to reason about data structure sizes in the JVM, or check out the code that GCC outputs, or look at the Python interpreter source code. Having a bunch of monolithic magic with its own world view sitting between you and the machine is a big barrier. I'm skeptical of anythi…

We've heard this all before, though. 40 years ago, Machine Code was where it was it, and people scoffed at those who were lazy enough to use an assembler. Then Assembly was where it was at, and the abstraction that C provided was leaky and poor, and compiled code could never be as good as hand-written assembly coded directly against the individual processor instruction set.

The problem with this argument is that it applies just as much in the two above examples as it does in this one, and it's clear that C has really taken off. Making good abstractions is damn hard, and the law of leaky abstractions is brutal, but the success of C, and even Java (a virtual machine on top of a compiler on top of a assembler on top of the machine!) shows that it can be done.

I'm pretty happy I can write code in C and can't imagine worrying about things like different instruction sets, registers, L1/L2 caches, etc. just for a basic "hello world". Perhaps in the future, people will think it equally crazy that we had to worry about details like what database we use, how we serialize data over the wire, manually creating ajax endpoints, etc.. Perhaps they'll let the compiler do all this work and only dive into manually fiddle with this stuff when they need to squeeze the last 10% performance out of the system, just as C programmers sometimes drop into ASM today.

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

#56
post #17

Earlier quoted context omitted.

It's much more readable than complex combinations of " and '. Furthermore, with the static typing, all your structures are checked at compile time: Try it, you'll see how helpful it is.

Oh yes. The mess of " and '. I'd love to be able to avoid that. Especially for stuff like this: ' ' Did you notice the bug? EDIT: Whoops, I made some other bug accidentally.

Ah but you should never have to write code that looks like that.

Use a templating language like Mustache (http://mustache.github.com/). Or simply use string interpolation, which most dynamic languages have baked in: http://en.wikipedia.org/wiki/String_interpolation

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

#58

Earlier quoted context omitted.

Agreed. This 'but we wanna make millions with a dual license as that 0.000001% of open source products do' attitude is definitely the largest barrier for this. And it's incredibly short sighted; just open up (L)GPL and do services + support. All big companies WILL buy support as that's what they do. AGPL is crap and will stop your growth; you have an uphill battle already, so don't do stupid things like that.

All big companies WILL buy support as that's what they do. No they won't. MIT license lets them use the software for free. Why woukd anyone pay anything if it can be used freely?

I think the phrase says buy support. That's not the software, that's, "we need it to do XYZ and QPR, since you know how it works can you help us ?"

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

#59
post #42

Earlier quoted context omitted.

All big companies WILL buy support as that's what they do. No they won't. MIT license lets them use the software for free. Why woukd anyone pay anything if it can be used freely?

Because big companies are marred by red tape and bureaucratic policies which require them to spend money on support rather than figuring it out themselves.

Most projects eventually encounter thorny issues. If your only recourse is to let someone smart go into a deep dive while everyone waits, a lot of bad things can happen. You might not even have anyone with the wits and drive to fix it, or you might get a terrible hack that becomes a maintenance black hole. Meanwhile, your schedule becomes a question mark, naysayers against the technology form cliques, etc.

Small teams of motivated people can make just about anything work. For everyone else, support makes project schedules more predictable and can avert certain painful scenarios.

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

#60
post #13

Opa however extends the classical syntax with advanced features specific to the web. HTML fragments can be inserted directly without quotes: line = bar ; I'm not sure that this helps readability, feels like reverse php (html inside code, vs code inside html).

Reminds me of XML literals in .NET.
Post reply on HN