TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why I have no favorite programming language

58 点作者 ilyash超过 7 年前

24 条评论

skywhopper超过 7 年前
Interesting points. As a long-time sysadmin; a big fan of Bash, Ruby, and Go; and a bemused observer of &quot;we need to replace the shell!&quot; manifestos like this one, I have long believed that the low-friction of system-level interaction you get from Bash is inextricably linked with its contradictory, confusing, and error-prone syntax. You can&#x27;t have one without the other. Ruby is one step up the chain. Still easy to get going on a project, much cleaner syntax and more consistent behavior, but the abstraction separates you just enough from the OS that it&#x27;s no longer trivial to interact with files, processes, and pipes, and instead there has to be an API. Then a language like Go, carefully designed to be as self-consistent and predictable as possible, but the trade-offs are enforced error handling, higher LOCs-to-functionality ratio, and the compilation cycle, and now interacting with OS-level abstractions like files and pipes becomes a major chore, not a magical puzzle of joy like Bash sometimes feels like.<p>I wish the author good luck with his NGS, but I don&#x27;t think it&#x27;s possible to make something as direct as Bash that has all the other features the author wants. But more power to him for trying.<p>Although, looking at the Github page, I get the impression the author is writing software to automate AWS deployments after getting fed up with Terraform and CM tools, rather than a Better Shell Language. Maybe it&#x27;s both, but the 100% AWS example code does not remotely appeal to this AWS sysadmin.
评论 #15448614 未加载
评论 #15448896 未加载
zaptheimpaler超过 7 年前
Have you met our lord and savior, Ammonite Shell on Scala? <a href="http:&#x2F;&#x2F;ammonite.io&#x2F;#Ammonite-Shell" rel="nofollow">http:&#x2F;&#x2F;ammonite.io&#x2F;#Ammonite-Shell</a><p>It has same terse syntax as bash but much more structured (and easy to add more) because language is powerful. The downside is its slow, but that might have changed already with Scala Native.<p>The key is it is full scala with some extra niceties that do the stuff bash does. So you get full power of a programming language, extended down to do stuff bash does. Better approach IMO than extending a shell &quot;up&quot; to more and more expressive power towards a quirky programming language.
评论 #15448615 未加载
评论 #15448609 未加载
reacweb超过 7 年前
He starts creating a new language based on complaints about 5 common languages. IMHO, he should start by understanding why so many people are fond of these 5 languages and why they were so successful. Then, he should understand that people do not only have different tastes, but also different way of thinking that may imply different style of programming. A good language is often a compromise between different requirements.<p>Personally, I start with bash for very trivial tasks. As soon as there is data to manipulate, I switch to perl. If program gets bigger and needs to be split into modules or classes, I switch to python (I am less fluent in ruby and go). Sometimes I switch to python earlier because of some libraries. If the program gets more bigger, needs to be maintained or suffers from slowness, I switch to java. My favorite language is perl, but I use the one that fits best.
评论 #15450519 未加载
评论 #15448789 未加载
rbanffy超过 7 年前
&gt; Inconvenient&#x2F;verbose work with files and processes. Yes, there are libraries for that but there is no syntax for that<p>Why would a language concern itself with files and processes? This is precisely why libraries are for. And with languages like Ruby, you can pretty much make the syntax.<p>&gt; I would like to fill the gap<p>Every time we decide the solution to a problem is a new language, we end up with two problems. There are valid reasons to invent new languages, but such a narrow domain-specific problem is not one of them.
jokoon超过 7 年前
I really don&#x27;t understand his critique on python. Being able to do functional programming is still great. He doesn&#x27;t have a lot to say about python.<p>To be honest, python is just the greatest thing ever. It&#x27;s not penetrating well because there is no money behind it like java or go. Like I said, if there was as much money spent on python that there is on js, it would be just great.<p>Creating a good enough programming language is very hard because it requires experience in engineering and all the compromises it entails, and it also requires not trivial compsci skills. Creating a maintaining a language is hard.
评论 #15448773 未加载
评论 #15448550 未加载
评论 #15448568 未加载
staticelf超过 7 年前
Sounds like that guy needs to check out Powershell.<p>It has a lot of the missing features that bash is missing according to the author and is a very underrated scripting language.<p>It has support for linux and you may write Cmdlets in Python or other languages for that matter.
评论 #15448730 未加载
k__超过 7 年前
I don&#x27;t have a favourite too, but it happened to be that I know to most about the one I work with every day.
DanielBMarkham超过 7 年前
I&#x27;m really happy with using F# to write true microservices using the Unix Philosophy.<p>F# makes me learn to be a better programmer and it&#x27;s fun, so there&#x27;s that. Coding using the Unix Philosophy gives me all the goodness that the author seems to want, all without having to install yet another shell. The only pieces of the bash shell I&#x27;m developing are the pieces that help solve the problem in front of me. Everything else is stuff that the next guy can&#x27;t pick up off the web.<p>I don&#x27;t like being a fanboy. Maybe next year I&#x27;ll start playing around with Haskell. But rewriting&#x2F;replacing the shell? E-gads. You&#x27;d have to make a tremendously better case than this author does. (Insert long discussion here about tools, frameworks, and bad coding discipline)
grondilu超过 7 年前
&gt; The Sigils syntax does not resonate with me.<p>I&#x27;m a Perl fan and I have to say that sigils should go. Or at least become optional.<p>Most of the times it&#x27;s just one character too many.<p>Say you want to write an anonymous function with three arguments like f(a,b,c) = a+b c<p>In Perl (either 5 or 6), you could for instance write :<p><pre><code> sub ($a, $b, $c) { $a+$b*$c } </code></pre> It&#x27;s not that long, but each &quot;$&quot; is kind of a visual stain that beclouds the variable name.<p>To me, it would make sense for instance that read-only variables would have no sigil. It&#x27;s already the case in Perl 6 for constant, since you can write :<p><pre><code> constant pi = 355&#x2F;113; </code></pre> but if you want sigilless parameter names, you have to use a backslash :<p><pre><code> sub (\a, \b, \c) { a+b*c } </code></pre> which is quite ugly.<p>Just make the sigils optional already.
golergka超过 7 年前
&quot;Compiled&quot; as a negative side? Really? Compiler is my best friend, and that&#x27;s why I don&#x27;t like interpreted languages - you have to (mostly) actually run all the code paths to make sure they&#x27;re correct.
empressplay超过 7 年前
Being a polyglot developer is a very wise way to go. Languages are like different tools, and each job has an appropriate tool -- trying to use one language for everything is like trying to fix everything with a hammer.
ryanpcmcquen超过 7 年前
Call me crazy but I love Bash. At my first programming job I spent months working on Ansible scripts to get a deployment project going. In hindsight, Bash would have been far more effective (for me). I eventually ended up provisioning all my own systems with shell scripts.<p>Relevant project: <a href="https:&#x2F;&#x2F;github.com&#x2F;ryanpcmcquen&#x2F;config-o-matic" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ryanpcmcquen&#x2F;config-o-matic</a>
mbrock超过 7 年前
I highly encourage this kind of experimentation!<p>Unix has a long tradition of neat little languages that make system programming easier... but none of them is all that good.<p>I planned to make a language like this myself, and still do, in the back of my mind. Ever since running into Nix and NixOS, I&#x27;ve felt that I have to integrate that worldview into the hypothetical language&#x2F;shell design. Not sure how.
mattmanser超过 7 年前
Funny there&#x27;s no mention of Powershell, wonder if he knows about it.<p>Even if just to learn from them what they did wrong.
评论 #15449907 未加载
naranha超过 7 年前
Would love to hear the author&#x27;s opinion on node with async&#x2F;await? I sometimes use it for sysadmin tasks, and it&#x27;s quite enjoyable. Mostly due to the great ecosystem. ES is certainly not made for sysadmin tasks, but I prefer it over go&#x2F;python&#x2F;Ruby&#x2F;Perl.
评论 #15449876 未加载
dlss超过 7 年前
TL;DR: OP hasn&#x27;t tried haskell yet ;p
评论 #15448584 未加载
评论 #15448570 未加载
yumaikas超过 7 年前
ilyash, I think you should see if <a href="http:&#x2F;&#x2F;www.oilshell.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.oilshell.org&#x2F;</a> might be worth your time. (not the author, but I respect it&#x27;s goals)
dintech超过 7 年前
I hate them all equally.
hvidgaard超过 7 年前
I immediately think of the very relevant XKCD about standards <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a><p>Over my career as a developer I&#x27;ve learned to just embrace whatever I&#x27;m working on. Soon enough I learn the peculiarities of the language and framework, and I&#x27;m productive. Most of the time the productivity gain from the perfect language and&#x2F;or framework is minor, compared to the time I spend thinking about a solution.<p>Personally I&#x27;d just select a reasonably available tech, say F#, and use that if I want to write my scripts in a functional way. Over time you make your own library of useful functionality, and you don&#x27;t have to fight your way around the language because you get to know it well.
评论 #15448631 未加载
thesz超过 7 年前
No haskell where embedded DSLs shine. He can implement his &quot;ideas&quot; easily there and then proudly present them to the world.<p>Basically, he didn&#x27;t do due diligence in PL. ;)
freecodyx超过 7 年前
well, i do like go ...
cup-of-tea超过 7 年前
While I do sometimes wish Python was even more functional, I don&#x27;t understand why the author mentions map and filter when those are actually still built in. If you like map and filter then just use them. The lack of a built in identity, compose and reduce is annoying, though.
评论 #15448935 未加载
holydude超过 7 年前
To me it sounds like a DSL created by much more powerful language would be really better than a completely separate prog. language. But if he wants to do it why not. It&#x27;s just at some point a programming language per se will be used &#x2F; abused to do much more than it was designed for. And that is why even to this day we can see a lot of bash &quot;web&quot;,&quot;automation&quot; code glued together in the wild.
评论 #15448572 未加载
throwme211345超过 7 年前
Garbage feedback from a prima-donna. Yay: I can&#x27;t code in your crap because it&#x27;s 2017 bro. Twitwit nonsense.