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.

What programming language has the most beautiful syntax?

10 pointsby sneha1995almost 2 years ago
What programming language has the most beautiful syntax?<p>The most beautiful syntax is subjective and varies from person to person. Some people might find a particular programming language&#x27;s syntax to be elegant and straightforward, while others might find it unnecessarily complex. Ultimately, the choice of programming language depends on the specific requirements of the project and the preferences of the programmer or development team.

20 comments

mikewarotalmost 2 years ago
Free Pascal handles pointers in the cleanest way possible. @ is the address of something, and ^ is what something points to. There&#x27;s no ambiguity about anything, and certainly no confusion with array indices. Begin&#x2F;End might be a bit verbose, but it better impedance matches with my view of the world, so it works well for me.<p>Stoic&#x2F;Stoical&#x2F;MStoical is a non-Forth forth... which handles strings well, &#x27;string is a single world &quot;string&quot;, and &quot;longer string which can include spaces&quot; give you fairly good coverage of all of your string needs, and <i>unlike forth</i>, it just takes the top parameter (a string) as an input into : to define a word, so you can do<p><pre><code> &#x27;cube : dup dup * * ; </code></pre> This avoids a lot of confusion with modes and things that happen in the normal forth compilers.
nivertechalmost 2 years ago
In decreasing order:<p><pre><code> - English (the ChatGPT&#x2F;LLM programming language) - ML family - SQL (queries and DDL only - DSL) - Algol family (Algol 60&#x2F;68, Pascal, Ada) - Logo NoSyntax is the best syntax? - TCL&#x2F;Tk - Forth - Lisp family ... ETOOMANYSIGILS: - Perl &#x2F; Ruby &#x2F; Elixir ETOOMATHLIKE: - Prolog &#x2F; Datalog &#x2F; Erlang ETOOVERBOSE: - PHP &#x2F; Java &#x2F; C# ETOOANCIENT - SQL (Stored Procedures and Triggers) The worst: - various assembly languages - LaTeX - APL family - Brainf*ck</code></pre>
评论 #36590130 未加载
raxxorraxoralmost 2 years ago
If I can pick anything my vote goes to Pancake Stack: <a href="https:&#x2F;&#x2F;esolangs.org&#x2F;wiki&#x2F;Pancake_Stack" rel="nofollow noreferrer">https:&#x2F;&#x2F;esolangs.org&#x2F;wiki&#x2F;Pancake_Stack</a><p>Otherwise for a high level language and perhaps a controversial pick, but I like JavaScript. Simple and straight forward, can often be reduced to the absolute minimum.<p>You can of course make every language ugly by writing ugly code.
GianFabienalmost 2 years ago
None of them! Programming languages are designed to be machine parsed and compiled to working code. For me, most languages incorporate too many punctuation characters (&quot;fly dirt&quot; as a co-worker once called them) with different meanings for different languages. I almost suggested Lisp, but the long-hyphenated-function-names detracts from its otherwise simple syntax.
评论 #36588700 未加载
dylwialmost 2 years ago
I would pick ooRexx: <a href="https:&#x2F;&#x2F;sourceforge.net&#x2F;projects&#x2F;oorexx&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;sourceforge.net&#x2F;projects&#x2F;oorexx&#x2F;</a> Personally, I consider its free-form and case-insensitive syntax to be amazing.
pamorosoalmost 2 years ago
Lisp, because of the beautiful way its syntax represents code as data and data as code.
评论 #36591207 未加载
ofalkaedalmost 2 years ago
Assembly. It feels tangible, nothing is hidden, it is just bits and registers.
评论 #36584663 未加载
评论 #36587801 未加载
评论 #36614194 未加载
评论 #36589620 未加载
torstenvlalmost 2 years ago
C has to be up there.<p>One thing I find particularly beautiful is the elegance of how if and else work, which obviates the need for a separate elseif&#x2F;elif keyword.<p>I also like that types are always on the left, which provides a nice symmetry for assignments. When I declare `int x` with int on the left, what I&#x27;m saying is that an assignment of x (e.g., y = x) results in an int being passed to the left of the = operator. This is different from Rust, Zig, etc., which IMO get this wrong (or at least ugly&#x2F;counterintuitive).
beardywalmost 2 years ago
Of regularly used languages I would go for SQL in that quite often it does just what it says. It was developed for business people to use, and I pitched it as that early on, but ... not really.
评论 #36585328 未加载
frou_dhalmost 2 years ago
I really like the syntax of Standard ML. It&#x27;s pretty much the essence of that kind of static functional language, without a bunch of experiments and cruft bolted on.<p>Lack of cruft aside, even the basic syntactic choices are just plain better than OCaml, e.g.<p>- Commas instead of semicolons as separators in lists&#x2F;records.<p>- Local declarations mirror top-level declarations.<p>- Distinct keyword to create a new type vs a mere type alias.<p>- ...
评论 #36614205 未加载
rurbanalmost 2 years ago
Typescript over Python for me. Prolog also of course.<p>Much less strange new characters for new concepts, whilst still elegant. Not so the semantics, they suck a bit.<p>Ruby and C++ are almost perl&#x2F;rust like, esp. ugly.
strokirkalmost 2 years ago
Even though I prefer Python, I find Ruby can be very beautiful. Allowing ? and ! as part of variable and function names is very nice.
rochakalmost 2 years ago
Python. I love working with it (except when it comes to package management and distribution).
gregjoralmost 2 years ago
C, but beauty is in the eye of the beholder.
theihoralmost 2 years ago
Lisp. Best syntax is no syntax.
jarpschopalmost 2 years ago
I find Python and Haskell both very elegant.
flipcoderalmost 2 years ago
Python
account-5almost 2 years ago
I quite like dart.
评论 #36614217 未加载
atmanactivealmost 2 years ago
Perl.
b20000almost 2 years ago
c++