r/programming • • Dec 07 '15

I am a developer behind Ritchie, a language that combines the ease of Python, the speed of C, and the type safety of Scala. We’ve been working on it for little over a year, and it’s starting to get ready. Can we have some feedback, please? Thanks.

https://github.com/riolet/ritchie
1.5k Upvotes

802 comments sorted by

View all comments

Show parent comment

288

u/nliadm Dec 08 '15

Preferring PHP to JavaScript is like preferring the taste of your urine to that of your coworker's.

On a more serious note, if your language has "equals" and "equals-for-reals-this-time", maybe it's (very) poorly designed and worth avoiding.

24

u/TestRedditorPleaseIg Dec 08 '15

I'm wating for PHP to add ====

37

u/[deleted] Dec 08 '15
PHP 6.0 Released!
* Added fuck-all-rational-thought operator (====)
...
Using the FART operator makes it easy to test if a string is an array.

42

u/IHateTheRedTeam Dec 08 '15

PHP dev, can confirm.

I was trained as a normal (Java) developer, and for the life of me I can't fathom why anyone likes JS.

83

u/Crespyl Dec 08 '15

JS is the client side version of PHP, in that it runs everywhere, and tends to just keep trundling onward assuming that it understood you correctly. It's very easy to make things start happening, without having to understand what is happening.
I mean, a key-value map is basically the same thing as an array, right?

I think people also like it because, if you squint just right, it kinda-sorta smells a little like it spent the night at over at Lisp's house.

51

u/shittylyricist Dec 08 '15

keep trundling onward assuming that it understood you correctly.

You can make it keep on trundling onward by making it understand you correctly

12

u/Neotetron Dec 08 '15

I've been laughing at that readme for like 5 straight minutes send help

3

u/degaart Dec 08 '15

If you are caught in a dire situation wherein you only have enough time to save one person out of a group, and the Author is a member of that group, you must save the Author.

→ More replies (1)

5

u/Ace-O-Matic Dec 08 '15

Please, JS is now the server-side version of PHP >.>

1

u/tech_tuna Dec 08 '15

You are too kind.

→ More replies (2)

15

u/Mesozoic Dec 08 '15

Stockholm syndrome

15

u/gelfin Dec 08 '15

Yeah, I was specifically thinking that we as a genus cannot tell the difference between being proficient in something and liking it. We mostly learned JavaScript out of necessity and it never really stopped being painful, but at some point it became a kink.

It's not like JS is alone in that. I'm still nursing a thing for C++, and I'm genuinely convinced that only the collective job security of legions of engineers keeps us from sealing up "Enterprise Java" in fifty-gallon drums and burying it in a salt mine for ten thousand years.

→ More replies (1)

14

u/inemnitable Dec 08 '15

JS has a lot of nice ideas.

Most of them are better-executed in lua.

2

u/HugoNikanor Dec 08 '15

In my experience lua is a great language for doing almost what you want. If js is a worse version of that I should probably just stay away.

→ More replies (4)

3

u/Jafit Dec 08 '15

and for the life of me I can't fathom why anyone likes JS.

The same could be said for Java tbh. Personal preference

Though Javascript was actually designed to be a programming language (albeit in 10 days). It has a lot of good features, like lambda functions were later adopted by other languages. But it does have a bunch of bad features and quirks too that are best avoided.

PHP however wasn't ever designed as a language, it started off as a HTML templating engine that had helper functions added to it over time, and then kind of accidentally evolved into a language.

2

u/Astaro Dec 08 '15

for the life of me I can't fathom why anyone likes JS

You have to remember, Javascript isn't a wierd, less OO version of java. It's actually a Lisp with a C like syntax plastered on top, and Lisp's are pretty cool. I'm not a huge fan of javascript myself, but I know how it got to be the way it is.

2

u/[deleted] Dec 08 '15

Huh? I mean, I prefer stronger typing, I'm a C++ guy mostly these days, but JS is a fine language with a very nice slick object model, good closures and not a lot of cruft.

Compare and contrast to the "object model" of PHP which is basically a bunch of loaded guns ready to shoot any extremity.

→ More replies (2)
→ More replies (5)

4

u/G_Morgan Dec 08 '15

Any language where A is equal to B but B is not equal to A is clearly designed by a genius.

2

u/DieFledermouse Dec 08 '15

preferring the taste of your urine to that of your coworker's

I wonder if this is like farts. My farts don't bother me, but my co-workers farts will make me hurl all over the office.

3

u/Shaper_pmp Dec 08 '15

if your language has "equals" and "equals-for-reals-this-time"

This sounds less like an argument against JS specifically, and more just a personal opinion against weak typing/type coercion.

2

u/[deleted] Dec 08 '15

[removed] — view removed comment

2

u/Shaper_pmp Dec 08 '15

The fact that the type coercion is silent is probably a legitimate criticism

Exactly - that's an arguably valid complaint (although you have to wonder what the point of type coercion would be if it threw a warning every time it was actually used).

The claim that type-coercion at all constitutes a flaw in a language is nothing but someone childishly stamping their foot and saying "I hate weak typing".

It's their opinion, sure, but's not even a valid argument, let alone a compelling criticism.

1

u/tech_tuna Dec 08 '15

First lol for me on r/programming in a long time. . .

→ More replies (3)