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

Absolutely. I think a concatenative language would be great for this. It’d be easy to target for a wide variety of languages, statically typable if you like, amenable to analysis and optimisation, and much less inherently complex than JavaScript to parse and evaluate.

Moreover, it’d be trivial for browser authors to implement, so for a very low investment there could be a huge return. You can write a basic runtime for a full-featured concatenative language in a few hundred lines of C, and a compiler for it in a few dozen lines of Haskell.



'Ease of implementation' is a very low-ranking, I would almost say irrelevant, factor for the utility or uptake of a programming language. So what if there are only a couple of hundred lines of C, you'd still need tens of thousands at the least to provide a useful standard library.


I tend to think the usefulness of a (standard) library tend to decrease with the size of its interface. Because with more functions, it is harder to learn, harder to find the function you need, and makes programs less accessible because there are so many ways to do the same job.

My bet would be a minimal standard library, based on empirically most useful functionality. I very much doubt you'd need more than a thousand lines to implement that (not counting a possibly crap-load of optimizations).


In my experience, what matters more than the size of the interface of the standard library, is its organization. For example, I can't really read Clojure code, mainly because I have no idea what the various functions do. On the other hand, Python has a huge standard library, but usually the name of the function, in the context of the module (as in urllib2.urlopen or json.loads) or the name of the method in the context of the class of the object it belongs to (e.g. [1, 3, 2].sort()) is enough to figure out what the functionality is.

Though I wish I didn't have to type `from datetime import datetime` all the time...


It’s relevant because it’d be much easier to get the major browsers to implement a minimalistic language than another JavaScript. Simpler implementation means fewer security concerns and more time to focus on things that are directly relevant to programmer experience, such as that standard library.




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

Search: