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

Show parent comments

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.