Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Aren't all languages blub languages depending on the usecase?

If you write AI programs c++ is a blub language. How can you get anything done without macros?

If you program drivers PHP is a blub language. How can you get anything done without direct access to the hardware?

If you're doing webapps lisp is a blub language. How can you get anything done with a syntax that's so different from HTML and so difficult to read?

The whole premise of a blub language depends entirely on what you're trying to accomplish - the right tool for the right job.

Disclaimer - I'm not much of a programmer, so maybe my examples don't hold up, but you get the idea :-)



I actually picked up Clojure because I was:

Tired of having to write C++ to get decent graphics performance.

Tired of having to write C++ to get decent audio performance.

Tired of my cool dynamic web programming languages not being fast enough to do the above.

Tired of Python, Ruby, C++, C, Java, Objective-C, JavaScript having so little to offer in the way of elegant concurrency.

So I picked a Lisp because it could do more.


Disclaimer noted, but as to your lisp/HTML example, HTML and lisps actually have a lot in common - if you strip away the end tags and the angle brackets, you get something very lispy looking

    <div>
      <span>Hello</span>
    </div>
has the same (prefix) order of operators and operands as

    (div
      (span "Hello"))
Off the top of my head, the "hiccup" package for Clojure has an 'html' function (macro?) that translates just that sort of stuff directly into html


Interesting. Do you by any chance have links to some newbie resources? Maybe it's worth reading up on some sort of lisp. Clojure maybe?


Generating HTML from Lisp is very easy and natural. Of course, there are situations where it might be better to use an HTML template, and there are libraries for that too. Here are a few more examples of HTML generation in Lisp:

A tutorial about writing an HTML-generating DSL in Common Lisp: http://gigamonkeys.com/book/practical-an-html-generation-lib...

The Common Lisp HTML generation library most people actually use[0]: http://weitz.de/cl-who/

HTML generation in PLT Scheme's Continue framework: http://docs.plt-scheme.org/continue/index.html#(part._.Rende...

Arc's built-in HTML generation (powers this site): http://files.arcfn.com/doc/html.html

[0] I'm not actually certain about that, but I think it's the most popular.


clj-html - http://github.com/mmcgrana/clj-html

which is deprecated by

hiccup - http://github.com/weavejester/hiccup

though the latter has pretty lame examples


Also, AFAIK people generally use Lisp to generate HTML, not as a replacement to HTML.


A "blub language" isn't an inferior language, or one with less features. It's a language in the middle of the ladder that goes from assembly to the ideal language. All the languages you described except Lisp are, in PG's mind, blub languages. Notice that Lisp can be applied to every of your examples: just use it as a code generator (which is very commonly the case for HTML, and I've seen it done for C as well), or use an appropriate dialect (eg. bitc for low-level, arc or clojure for web programming, CL for AI).

What you're describing is just a less powerful or a less appropriate language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: