TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What are the pros/cons to using a single non-JS lang to rule them all?

2 pointsby _isusalmost 9 years ago
The important point is to be able to effectively use a single (non-JS ^) programming language for mobile, browser and server-side. Ideally, to cut down on the technologies folks would have to come up to speed on and allow them to go deep with a particular language. This is beyond isomorphic apps, though, these are included. So, F# can theoretically run on the server, in the browser (via Fable [1]) and on mobile (via Xamarin Studio [2]). Clojure has a similar story since JVM languages can run on Android mobile phones&#x2F;tablets and there is ClojureScipt [3]. These are just some examples of ones I am aware of. (I wonder if there is something like Fable for Swift?)<p>Is this a pipe dream, or is there real value to this approach?<p>^ Why non-JS? Mainly because I am interested in exploring other languages that can include statically typed, compiled languages.<p>[1] https:&#x2F;&#x2F;fsprojects.github.io&#x2F;Fable&#x2F; [2] https:&#x2F;&#x2F;www.xamarin.com&#x2F;studio [3] https:&#x2F;&#x2F;github.com&#x2F;clojure&#x2F;clojurescript<p>Edit: styling, grammar

3 comments

ThatGeoGuyalmost 9 years ago
The ultimate dream (IMO) is to use CHICKEN Scheme for everything. You can use it on the web [1], transpile to JS [2], run on Android [3], and since it&#x27;s so portable, you can basically use it anywhere C code can run (embedded, etc.).<p>In practice though, it&#x27;s not so glorious. CHICKEN still lacks strong numerics libraries (think Numpy, APL), and SPOCK, while useful, isn&#x27;t as rugged or battle-tested as say, Clojurescript. It doesn&#x27;t transpile to the greatest JS code, and I don&#x27;t believe it works with all browsers (docs seem to indicate it needs work [2]).<p>I think it could be reasonable to eventually get this level of support, but the Scheme community is already quite small and needs people to work on these sorts of things. Right now, I&#x27;d say it&#x27;s unreasonable to write everything (JS and numerics are the big problem) in CHICKEN, but we&#x27;re getting close.<p>[1] <a href="http:&#x2F;&#x2F;wiki.call-cc.org&#x2F;chicken-projects&#x2F;egg-index-4.html#web" rel="nofollow">http:&#x2F;&#x2F;wiki.call-cc.org&#x2F;chicken-projects&#x2F;egg-index-4.html#we...</a> [2] <a href="http:&#x2F;&#x2F;wiki.call-cc.org&#x2F;eggref&#x2F;4&#x2F;spock" rel="nofollow">http:&#x2F;&#x2F;wiki.call-cc.org&#x2F;eggref&#x2F;4&#x2F;spock</a> [3] <a href="https:&#x2F;&#x2F;github.com&#x2F;chicken-mobile&#x2F;chicken-android-template" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;chicken-mobile&#x2F;chicken-android-template</a>
评论 #12264330 未加载
_isusalmost 9 years ago
To clarify ... I am seeking advice on whether choosing a single non-JS language for &quot;all&quot; form factors is reasonable given existing languages, libraries, etc.
cjbprimealmost 9 years ago
ClojureScript sounds like it&#x27;s already doing this; I think most people simply prefer writing JS to writing Clojure.