Hacker News new | ask | show | jobs
What's the best programming language for rapidly getting out a prototype?
5 points by sarvasvkulpati 1895 days ago
Some languages like Clojure seem really interesting, but for the purposes of rapidly coming up with an idea and shipping something hacky really fast, as an outsider, it seems like it has a lot of setup/config compared to js.

With webdev, you can write an html file, some css and slap a js file and you're ready to start iterating within seconds. However, you lose the expressivity of a lisp like CLJS.

So considering tradeoffs between expressivity, developer productivity, "time to first char on screen" etc, what's the best language for rapidly prototyping something hacky that people can use?

7 comments

Sorry, I’m not into language wars. I would say the best language to get something off the ground is the language you already know. No language will offset the time it takes to learn it in the first project.
The problem with Clojure/Script is that there isn't a consensus on how to do things properly (IMHO, leiningen isn't transparent to beginners). Every language has its rituals, but as far as things go I'd pick Clojure/Script over npm-equipped JS any day, if only because it is such a blast to use once you do get things running correctly.

That said, I had to spend a couple of weeks agonising over my setup until I came across the newer and frankly, much simpler CLI tooling [1]. Today, I just manually create `deps.edn` and extend it as needed: pastebin.com/c8Ut928B

Setting up ClojureScript is a bit more complicated though, but not by much: pastebin.com/WdVyrd9T

Then I just run `npm install shadow-cljs react react-dom create-react-class` before doing `clj -M:shadow-cljs watch :client`, based on [2].

----

[1]: clojure.org/guides/deps_and_cli

[2]: shadow-cljs.github.io/docs/UsersGuide.html

I'd say for the web, the language is not as important as the ecosystem, in particular, as the frameworks and libraries for web development available.

In that regard, for a single developer or a small team your best options are Rails,Laravel or Django.

I prefer Rails because of its strong opinions, specially on frontend.

Once your idea makes you millionaire, you can start thinking about the purity and the universal beauty of Go, Clojure, Typescript, React, RxJS, lambdas, etc.

Depending on what you are prototyping I would recommend Python, Ruby, or Perl.

Python's "batteries included" approach and numerous libraries make it easy to build prototypes quickly.

Ruby (and Rails) have been used to create the first generation MVPs for many startups in the past. If you have Ruby experience, it's a good choice for prototyping.

Perl is good for prototyping command-line and system tools. The early versions of Git were partially-implemented in Perl.

Whichever one you're most comfortable with
That is not logically guaranteed. The fastest path to a prototype may in fact involve learning something you're uncomfortable with.

If you're most comfortable with a spoon, the fastest way to dig a trench is still an excavator, even taking into account the time needed to become comfortable with operating one.

Yes and no.

If your a pro with C and you really want to build a rest API, then yes using C is a bad choice.

But if you know Ruby, Python or NodeJS you'll be fine with any of the 3.

Then again, newer programing languages tend to cater to what we already know. Flutter/Dart is a dream to anyone who knows Java or Javascript.

Actually, when I think about it I learned Python since I really wanted to get into machine learning a few years ago. I was able to increase my income by around 80k, so it was very much worth learning.

Ruby on Rails is a popular choice, but it obviously depends on what you’re building. A JAM Stack like you seem to be talking about can be quick as well, but you have to deal with the API, which you left out in terms of prototyping.
Anyone that doesn’t say JavaScript is lying.