4 ms·
Ask HN: What are some less noisy programming languages?
I am a C++ developer. Looking at C++, it looks very "noisy" i.e. the syntax is really painful to the eyes e.g. take one of the class constructors of the 'any' library in Boost:
any(ValueType&& value
, typename boost::disable_if<boost::is_same<any&, ValueType> >::type* = 0 // disable if value has type `any&`
, typename boost::disable_if<boost::is_const<ValueType> >::type* = 0)
This is really painful to read because of the syntax "noise".
What languages are less noisy?
- Bostonian 5y agoPython, and I would argue Visual Basic and modern Fortran.
- elviejo 5y agoI agree, and I think less noisy languages are those in which white space is significant so: Haskell and python
- auslegung 5y agoElm and Haskell are two I have experience in that are so much simpler, syntactically, than modern C-based languages. F# is very similar to Haskell syntactically. That makes me wonder if all (or most) ML-based languages are “quieter” than C-based languages.
- thesuperbigfrog 5y agoAda (https://learn.adacore.com/courses/Ada_For_The_CPP_Java_Developer/chapters/04_Statements_Declarations_and_Control_Structures.html https://learn.adacore.com/courses/Ada_For_The_CPP_Java_Devel...) and Python (https://docs.python.org/3/tutorial/controlflow.html https://docs.python.org/3/tutorial/controlflow.html) both have very clean and easy-to-read syntax.
- nikonyrh 5y agoI am familiar with Python and Clojure, and have peeked at Haskell. Have a look at https://codegolf.stackexchange.com https://codegolf.stackexchange.com for just how succint you can get. In general dynamically typed languages require less up-front definitions and determine how things go on the fly. I have found that Clojure is great for data-mangling. This example groups words in a sentence based on the number of vowels in each: (group-by #(count (filter (set "aeiouy") %)) (clojure.string/split "this is my example input string" #" ")) {1 ["this" "is" "my" "string"], 3 ["example"], 2 ["input"]} Oh did I mention that in this language comma is threated as white space and can be ommitted? :D But you may have to use a few more brackets to group expressions appropriately.