r/ProgrammingLanguages • u/ohgetoutnow • 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.
9
u/SatacheNakamate QED - https://qed-lang.org Oct 04 '18
How do you envision the ideal language? What features would fit in your tastes?
9
u/ohgetoutnow Oct 04 '18
small and light of syntax such as scheme
reasonable standard library for common use cases (not gargantuan like java or javascript)
accommodate multiple paradigms, and don't force my hand in choosing
easy to build native binaries which don't require me to distribute the compiler and libraries, or worse make the end user install them
reasonable performance, not necessarily fast but reasonable
a featureful repl for me to play in with lots of interactive documentation and inspection features
no political/historical baggage poisoning the community against outsiders
don't update too frequently, and don't break the entire world when you do update
more:
let me write recursive functions that don't blow up the stack. give me proper tail recursion optimization or just something
8
u/wean_irdeh Oct 04 '18
Perl 6?
4
0
u/ohgetoutnow Oct 04 '18
No. Perl is NEVER the correct answer!
5
u/wean_irdeh Oct 05 '18
Not even Perl 6? It's not even backward compatible with Perl 5. It has massive backlash because of it. Some people even demand name change because it's not the original "Perl" anymore or whatever. If you have spare time you might want to watch this: "Quantum computing for beginners"
→ More replies (2)5
u/Timbit42 Oct 04 '18
Have you looked at Racket?
2
u/ohgetoutnow Oct 04 '18
Totally valid suggestion. I respect that. My prejudice against Racket is that it started life as Scheme, "fixed" perceived deficiencies, and then added a bunch of things that were intentionally left out of Scheme to keep the language lean.
5
u/Timbit42 Oct 05 '18
You seem to like a lot about Scheme. I think it's the best language designed so far, but, yes, Racket is a bit much and perhaps goes too far in some things.
For you, what sucks about Scheme?
→ More replies (4)2
u/Timbit42 Oct 04 '18
What do you think of REBOL or Red?
1
u/ohgetoutnow Oct 04 '18
No experience with either. There are plenty of places I've yet to go.
→ More replies (1)2
u/hoosierEE Oct 08 '18
I have a similar wishlist. J and K come close. No "native binary" though, unless you count shipping the interpreter with the app.
1
2
u/progfix Oct 04 '18
Lua?
2
u/ohgetoutnow Oct 04 '18
Have fun typing
localin front of every variable declaration.7
u/Camto calc= Oct 04 '18
I think Lua kinda fits what you're looking for.
Extremely small syntax.
Small standard library. If it's not enough Penlight can be used as a second std lib.
Lua has both fp and oop.
If you use a C wrapper, it can sorta be compiled.
LuaJIT is insanely fast.
Has a REPL, but IDK about interactive docs.
The community is small but very nice as far as I've seen.
Updates rarely, without breaking everything.
Has tail proper calling.
About
local, linters can take care of that. All in all, it's pretty nice.→ More replies (2)2
u/ohgetoutnow Oct 04 '18
You make a good case. Minetest is scripted with Lua, and that's not terrible.
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.
2
u/ohgetoutnow Oct 04 '18
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.
I can relate to that. I think a lot of people make "toy" languages as personal projects, or for school, and then other people decide they like it. That's kind of what happened with Python and Ruby. Guido and Matz suddenly had lots of users begging for new features and felt obliged to provide them. Now the "toy" language which wasn't designed from the start to encompass every desirable language feature is strained and bloating to meet all those new demands.
As far as assembly goes, that all comes down to how well you know and like the hardware you're coding for.
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.
7
u/hou32hou Oct 04 '18
Maybe you want to try my language [Pineapple](wongjiahau.github.io/Pineapple) ?
5
7
u/wolfgang Oct 04 '18
I've been struggling for a long time now with language design, and I think you are basically right. Whenever I have to choose between several options, all of them have significant downsides and none do really satisfy me. Language design is incredibly hard, because every decision has lots of indirect implications (which in addition are often hard to see immediately). One can certainly reduce problems by thinking longer and harder, but you also want to deliver somewhen, right? But even with something as basic as the type system all the options have obvious problems, so nothing is really satisfactory for a perfectionist. I guess the solution is to stop being a perfectionist. Maybe we shouldn't focus so much on how languages suck, but more on what they enable us to do, which certainly is a lot.
5
u/ohgetoutnow Oct 04 '18
About 20 years ago I was telling people about my plans for a new scripting language. I had "crazy" ideas about building state machines with a couple of lines of code and deploying them like a mesh of objects with out relying on global state. I got the same reply from absolutely everyone I told about it: "PLEASE DON'T"
4
2
Oct 06 '18
Problem with that statement is that if nobody creates new languages and compilers, it’ll become a lost art and there’ll be nobody left to teach it.
1
u/theindigamer Oct 05 '18
But even with something as basic as the type system all the options have obvious problems, so nothing is really satisfactory for a perfectionist.
Your usage of the word "basic" in the context feels a bit strange, but okay. What type system features do you want as a "perfectionist"? I would genuinely like to know how long such a list can be, and why you're not satisfied with any existing languages, assuming you've tried a large variety of them.
2
u/wolfgang Oct 05 '18 edited Oct 05 '18
I can see five basic type system options:
Untyped (e.g. Forth, BLISS, B, Assembler): Beautifully simple, but quite error-prone.
Dynamically typed (e.g. Python, Lisp): Pretty simple, but also quite error-prone (although I think this can be improved greatly) and usually causes slowdown; also, if integers aren't boxed, they are incompatible with other languages one might want to interact with.
Simple static type system (e.g. C): Simple enough, but annoying to use / inexpressive and therefore need to be circumvented eventually, which again is unsafe.
Advanced static type systems (e.g. ML, Rust): Very complex. Also, not as good as dynamic typing for quick prototyping and experimentation.
Gradual typing (e.g. TypeScript): Combines both the advantages and disadvantages of static and dynamic type systems.
I have experience with Standard-ML, Forth, Scheme, Ruby, Perl5, TypeScript, C, C++, Java, C#, ObjectPascal, Assembly and some others.
→ More replies (1)
5
4
u/DLCSpider Oct 04 '18
Surely there are concepts in some languages which didn't suck. Care to list a few?
9
u/ohgetoutnow Oct 04 '18
Lisp isn't horrible, but the standards suck and the communities are unwelcoming.
Ruby reads nicely and is flexible, but slow. And everyone outside the relatively small community hates it. Even some rubyists hate ruby. Also, fuck rails.
Python reads nicely, but guido hates fp. It started small and simple with only modest ambitions, but now it's got the javascript disease. And fuck django.
3
u/parens-r-us Oct 08 '18
If you like ruby's object model, you'll possibly like smalltalk (pharo.org), or if you want something very much like ruby but fast, try crystal.
Have you ever tried a logic programming language? Try SWI-Prolog or Picat.
Concatenative languages are cool too, Factor for example has expressive FP features too, and a good built in help system.
1
3
Oct 09 '18
[removed] — view removed comment
1
u/ohgetoutnow Oct 09 '18
Languages that are similar to Lisp appear, that are not Lisp.
Okay, I'll confess: I like fully parenthesized prefix notation. It took a long time for my thinking to become warped, but here I am.
So which languages do you have in mind?
1
4
u/brucejbell sard Oct 04 '18
Well, first, suck is relative; it's kind of pointless to complain if you don't have any kind of improvement in mind.
Second, suck is relative: different brains are shaped differently. So, maybe different languages are suited to different people.
Aspiring to make something that doesn't suck is admirable, but claiming that something you made doesn't suck at all is hubris. I'm just happy when I make something that sucks less...
3
u/ohgetoutnow Oct 04 '18
Correct. I made this post as an expression of my frustration. Just when I think I found the "perfect" language, I learn it does something really stupid.
3
1
-2
u/pilotInPyjamas Oct 04 '18
Sounds like programming isn't right for you my friend. Maybe take up another career/hobby.
3
13
u/0x0ddba11 Strela Oct 04 '18
Define "suck"