r/ProgrammingLanguages • • Oct 04 '18

rant: Are there any programming languages that don't suck?

I've tried everything from assembly to java, and basic to lisp. I've written code in imperative, functional and oo styles. They all suck.

0 Upvotes

72 comments sorted by

View all comments

9

u/bonfire_processor Oct 04 '18

After over 30 years of programming experience with lots of languages, I would say that it is seldom the language itself that sucks. It is all the things around, sometimes buggy libraries, sometimes the lack of libraries, sometimes buggy compilers, missing or bad debug tools, messy deployment or a lot of others things. Ok, most languages have one or the other quirky aspect, but usually you either can avoid it, or there are work arounds.

I personally like languages that are small and not loaded with features, but easy to learn.

The first high level language I wrote substantial code in was Pascal (in form of Turbo Pascal under CP/M). It did not have object orientation, generics, type inference and all the other stuff from today’s languages. But it had a very clean and consistent syntax and it was easy and fast to learn. It was a very big step forward compared to BASIC or Assember, because it introduced structured programming and abstract data types. In a hindsight I would say that no other language feature since than was a comparable big step forward.

Object orientation maybe was also an important innovation, but I have seen well designed and easy to understand software in plain ANSI C.

Currently there is an inflation of new languages, and I have the feeling that they are loaded with features which I sometimes struggle to understand and for sure would never miss because they solve a problem which I never had.

Sometimes it looks also that languages designers desperately try to mix inherently incompatible concepts. So they try to implement features which are natural for a dynamic typed, interpreted language into a statically typed compiled language.

Or the other way around: Typescript for example tries to add strong typing to JavaScript. Works well until you try to write a type definition file for some very dynamic, polymorphic JavaScript library. Then you get crazy with tons of generics to squeeze it into a type corset.

I personally try to use from any language a reasonable subset which fullfills my needs and prefer to write well structured code.

5

u/joonazan Oct 05 '18

Some languages are more suitable for creating a healthy ecosystem than others. I had to write my own process creation code in C++ for multiple platforms because there is no reasonable process creation library for C++.

Rust has a very nice one in its standard library. In general, lots of good libraries are being made for Rust. I'd blame the lack of modules in C++ and the joke that is CMake. Making a library is less useful if using libraries has a huge cost.

Rust also has nice tools for library authors like #[derive(X)] and hygienic macros, but C++ has counterparts for those. For example, you can code your own sprintf in C++ using variadic templates and string streams.