Live data from Hacker News

Thoughts on Designing a new Web Apps Language

heapified.com

21–30 of 43 posts

Re: Thoughts on Designing a new Web Apps Language

#21
What are "Web apps" actually? Each Web app is either a) a bunch of more or less tightly connected marked-up text documents, delivered by an up running on some server somewhere, or b) two applications, one running on a server and one delivered to be executed in the visitors' browsers (or, most often, some combination of the two). There is no single thing called "Web app", even though many vendors have been trying (and failing) to make it look so.

What we need is a better way to use Internet as a platform on a large scale; sadly, none has been widely accepted so far.

Re: Thoughts on Designing a new Web Apps Language

#22
post #8

He rather lost me at first two points. I don't hear a lot of complaints from the Python or Ruby camps about how much they desperately miss static typing. It would have to be via a seriously 'get out of my way' type-inference for me to want to allow all that ugly back into the language. And point 2. Performance? Again - don't hear much complaining about this for the vast majority of applications. I rarely find the bot…

So, like I said in the post (but perhaps didn't make clear enough) is that there are plenty of options for when scaling isn't too much of an issue. But you take a look at Twitter (Ruby/rails and now scala, I think? which kinda goes towards my point) and facebook (hacked up php and made it compile). My thoughts were focused on a language that you could start something small in (aka easy enough to use), but that could scale up reasonably well.

Re: Thoughts on Designing a new Web Apps Language

#23
post #8

He rather lost me at first two points. I don't hear a lot of complaints from the Python or Ruby camps about how much they desperately miss static typing. It would have to be via a seriously 'get out of my way' type-inference for me to want to allow all that ugly back into the language. And point 2. Performance? Again - don't hear much complaining about this for the vast majority of applications. I rarely find the bot…

Have you ever used anything in the ML family of languages (e.g OCaml/Standard ML/Haskell)? You barely ever have to write types in these as long as your program makes sense..

Right on. I'm not sure I'd go so far as wanting the language to be as strict/typesafe as those (also calling Haskell an ML derivative is kind of funny, but I know what you mean)

Re: Thoughts on Designing a new Web Apps Language

#24

Earlier quoted context omitted.

Have you ever used anything in the ML family of languages (e.g OCaml/Standard ML/Haskell)? You barely ever have to write types in these as long as your program makes sense..

It'd be better to simply have a JIT with type inference for performance.

Perhaps? It's unclear that a JIT with type inference will give you better performance than compiling (especially if you were to do profile guided optimization) (sidethought: not sure if llvm has support for PGO).

Also, if most of your types are static anyway (which in my middling amount of experience, they tend to be), I personally would rather get compile time errors rather than runtime errors. But maybe thats just me.

Re: Thoughts on Designing a new Web Apps Language

#25
post #7

Ur/Web hits every single one of your bullet points out of the park: http://www.impredicative.com/ur/

I had a friend mention this to me before I wrote this, and it does seem pretty neat.

That said, I think it's big shortcoming to me (havent spent much time with it, spent ~10 minutes going through some of the demos) is that its a functional language. Personally, I don't mind haskell/sml/their ilk, but since I was trying to conceive of a language that people would actually use/adopt, it needs to be imperative and probably resemble something along the lines of C/php/python.

Re: Thoughts on Designing a new Web Apps Language

#26
post #8

He rather lost me at first two points. I don't hear a lot of complaints from the Python or Ruby camps about how much they desperately miss static typing. It would have to be via a seriously 'get out of my way' type-inference for me to want to allow all that ugly back into the language. And point 2. Performance? Again - don't hear much complaining about this for the vast majority of applications. I rarely find the bot…

> I don't hear a lot of complaints from the Python or Ruby camps about how much they desperately miss static typing. It would have to be via a seriously 'get out of my way' type-inference for me to want to allow all that ugly back into the language.

I can't speak for anyone else, but I do miss static typing when I'm using languages like Python and JavaScript for web work. However, I think it would take more than just type inference to make a strongly/statically typed language that was good for the same jobs. You also need powerful tools for parsing freeform input such as JSON or XML, both to bring valid input into your static type system with little effort and to give as much control as you need to recover from unexpected input.

The first problem is solved by many languages; the second one, not so much. I think that is part of why dynamic languages are so popular for web development today.

As an aside, there is also a design/architectural question here. The theoretician in me says of course I should parse and validate all incoming data as close to the point where it comes into my server-side code as possible, so everything internal is clean. This fits nicely with the whole static typing thing. On the other hand, the pragmatist in me says that sometimes, particularly while prototyping, it's useful to keep the parsing and error recovery logic close to where the data will be used. That's much easier if you can just dump all the input into a nested array of hashes of objects of dictionaries of widgets when it arrives and worry about the details if and when you get to the code that cares.

Re: Thoughts on Designing a new Web Apps Language

#27
post #8

He rather lost me at first two points. I don't hear a lot of complaints from the Python or Ruby camps about how much they desperately miss static typing. It would have to be via a seriously 'get out of my way' type-inference for me to want to allow all that ugly back into the language. And point 2. Performance? Again - don't hear much complaining about this for the vast majority of applications. I rarely find the bot…

Have you ever used anything in the ML family of languages (e.g OCaml/Standard ML/Haskell)? You barely ever have to write types in these as long as your program makes sense..

F#

Re: Thoughts on Designing a new Web Apps Language

#29
Facebook's XHP is a magnificent tool that you need to use to appreciate. It lets Facebook build a website out of reusable components that know how to load their own data. It's very different from the MVC paradigm, but very light-weight. The XML components are full PHP classes, including allowing for methods, subclassing, etc.

The emphasis on components instead of pages is not strong enough in many other web frameworks like Rails.

Re: Thoughts on Designing a new Web Apps Language

#30
post #29

Facebook's XHP is a magnificent tool that you need to use to appreciate. It lets Facebook build a website out of reusable components that know how to load their own data. It's very different from the MVC paradigm, but very light-weight. The XML components are full PHP classes, including allowing for methods, subclassing, etc. The emphasis on components instead of pages is not strong enough in many other web framework…

Couldn't agree more. Its been the use of XHP and looking at the ... contraption HPHP is that started me thinking about this in the first place.
Post reply on HN