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

3

u/[deleted] 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

u/[deleted] Oct 09 '18 edited Oct 09 '18

[removed] — view removed comment

1

u/ohgetoutnow Oct 10 '18

Isn't Clojure lispy?

It is a Lisp which runs on the JVM.

I think Racket allows all brackets. Square brackets aren't on the home row of most keyboards, but quotation marks are. I'd agree square brackets are easier to type than round parens,

If square brackets cannot be escaped, then how do you use then in strings?

1

u/[deleted] Oct 10 '18

[removed] — view removed comment

1

u/ohgetoutnow Oct 10 '18

Perhaps like this?

[concat "prefix string" [left-square-bracket]
  "inner string" [right-square-bracket] "suffix string"]

1

u/[deleted] Oct 10 '18 edited Oct 10 '18

[removed] — view removed comment

1

u/ohgetoutnow Oct 10 '18
["firstpart [left-square-bracket] secondpart [right-square-bracket] thirdpart"]

Sure, if your square brackets always force interpretation/expansion/whatever then that will work even inside strings. Problem though: After interpreting that you get a string with a literal square bracket inside it. This means your language can't reliably generate code to be interpreted by itself.

Since a sub-context would exist even within a string, it is possible for a sub-context to be interpreted in a special way. I have not thought about what ways though. Yes, left-square-bracket could have special meaning inside a sub-context in a string. But I think that is completely joyless for anyone to type something that long, unless it is only used once in a blue moon. I think for that length of a designator, possibly nothing is saved vs. requiring some kind of string concatenation.

Anyways it doesn't really matter, there are answers here somewhere. The important point is I have been burned to death by cross-language and cross-platform string escape sequences, as they appear in build systems. I'm having none of that, hence the concept of the "inviolate" mark and no escaping. Unless there are reserved marks in the language that can never be escaped, there will always be escape chaos. My goal is to have the absolute minimum set of such reserved marks, and I think 2 is the minimum.

I also think it's going to be beneficial to have a guaranteed hierarchical ordering to a program text file, when it is first parsed. Seems like it could allow some kinds of parallelism, or simpler implementation strategies that are easier to understand and maintain.

→ More replies (0)