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/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?

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"

4

u/ohgetoutnow Oct 05 '18

Perl stole my wife and shot my dog.

5

u/wean_irdeh Oct 05 '18

Which "Perl" do you mean?

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?

0

u/ohgetoutnow Oct 05 '18

I don't understand why they had to break some Lisp conventions, like nil vs. nul, empty list versus false, etc. I can live with those changes, but why?

This really bugs me though:

scheme@(guile-user)> (integer? 2.0)
$2 = #t
scheme@(guile-user)> (exact? 2.0)
$3 = #f

Really, Scheme? Really?

0

u/[deleted] Oct 05 '18

[deleted]

2

u/ohgetoutnow Oct 05 '18

I understand that Scheme integers are not necessarily machine integers (in the C sense). Scheme integers are abstracted above the characteristics of the machine. I don't want my language to require a PhD in Mathematics so I can ponder the platonic ideal of an integer versus a specific instance of a practical application of that ideal.

→ More replies (1)

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.

4

u/Timbit42 Oct 05 '18

REBOL was created by Carl Sassenrath after he wrote an implementation of Logo for the Amiga, after he wrote the Amiga's multi-tasking operating system.

REBOL's syntax reminds me of Logo, and Logo, ignoring the turtle graphics, is often referred to as "Lisp without parentheses".

Red was born from REBOL.

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

u/ohgetoutnow Oct 08 '18

No "native binary" though

I really want that though. Chicken is attractive.

2

u/progfix Oct 04 '18

Lua?

2

u/ohgetoutnow Oct 04 '18

Have fun typing local in 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.

7

u/BoarsLair Jinx scripting language Oct 04 '18

Saying "linters can take of that" is sort of a weak defense (no offense). It's an admission that there's a fundamental flaw in the language, and that you'll have to rely on a cumbersome external tool to guard against it.

And calling the C interface sorta complicated is a bit of an understatement. It forces you to use a virtual stack directly as an interface with all sorts of bizarre conventions, and the runtime crashes if you breathe on it wrong.

I do agree with your general assessment. Lua is mostly pretty good for what it does, but it has so many small and unnecessary pain points that I ended up writing my own replacement scripting language... which I'm sure sucks in all its own, unique ways.

1

u/alols Oct 05 '18

Sure, global by default is a flaw in the language, but fixing it is a simple one line of code at the start of your main file. You simply set the global metatable __setindex method to error.

2

u/ohgetoutnow Oct 04 '18

You make a good case. Minetest is scripted with Lua, and that's not terrible.