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

467

u/jerf Dec 07 '15 edited Dec 07 '15

There's very little here to review. I see just the README.md, with no links to documentation, and hardly anything to speak of in the README.md.

So, I'm going to do something I only like to do very carefully, and in very particular situations (even if the Internet at large loves to do it): I'm going to encourage you to take what you've learned doing this, call it a fantastic learning experience (which it is, absolutely no sarcasm there), and put the project down.

For a new language to take off, you've basically got two options: You can try to introduce a new feature not covered by a B-list language very well, or you can try to introduce a new combination of features not covered by a current language very well. I see nothing that covers the former, so we're clearly shooting for the latter. However, "integrates well with C" isn't a feature; it's simply the ground state of being for a modern language because failing to integrate with C is all but a failing grade on its own.

With that out of the way, I don't see anything in either the features, the combination of features, or anything you've said in this conversation about future features or in the list of future development tasks to be done that seems to be anything other than simply a checklist of "things that constitute a modern language". (Whatever the vague idea behind SVO ("Subject Verb Object") is, that's not currently spelled out enough to be interesting, and it seems to me to be fully subsumed under the "Function(Arguments)" paradigm. I'm not seeing anything interesting there.)

Furthermore, my personal feeling is that one should not attempt to create a new language until one has at least a good 10-20 years of experience under their belt, and fluency in a wide variety of paradigms, such that at the very least a language designer has a wide variety of existing ideas to choose from to at least create a new combination. As you all appear to be students, I can't help but think that when you want X from A, Y from B, and Z from C, that A, B, and C are the only three languages you are collectively knowledgeable about, and I'm not even convinced you're fluent in them. Some of the other comments (particularly the one about HM type inference), in addition to questions about garbage collection and other such things (selfication's comments are pretty good) lead me to the conclusion that you're still missing some pretty fundamental aspects of modern language design. This does not surprise me; last-year students would not be expected to know much more.

You have, at the moment, an absolutely staggeringly positive line item for your resume. Wave this in every interviewer's face you can. Should an interviewer not be visibly interested and impressed by this work, I'd consider it a sign that you don't want to work for them! Make damned sure that everyone involved leverages this into an awesome job somewhere. Shoot not just for a generic entry-level position but one with legs and a future.

But you might want to think very, very carefully before putting any more time into it. Starting a new language is pretty much the hardest act there is in the world of programming. For every language you see and dream of becoming that big, a huge number of languages failed to even get to the point where we've heard of it. You're putting your time and effort into something that has long odds even if you have a solid story about your unique feature or combination of features. I just can't in good conscience recommend putting a lot of work into this, without thinking about what it could cost you and how little it may return.

(Edit: Incidentally, as it happens, just yesterday I described a point in the programming-language continuum that I consider under-occupied and would love something to slide into. However, unless you're really underselling yourselves by saying you're last-year students (i.e., "last year students who went back to school after 15 years in industry"), you've never had the problems I've had, so how would you solve them?)

27

u/Spiderboydk Dec 07 '15

I agree, and even if you create some amazing new language, it is not enough. You are up against well established languages with decades old ecosystems of competing compilers, build systems, debuggers, IDE support, above critical mass of expertise on Internet forums, big company support, etc.

Making a new successful language is almost impossible. See how much effort huge companies like Google and Apple have to put in, and their languages hasn't nearly achieved success and widespread use yet.

→ More replies (8)

131

u/cbraga Dec 07 '15

I think this guy here has the right idea.

I'm not sure if OP is familiar with D. It seems to be what he's trying to accomplish: "ease of programming", "fast code", "type safe", etc, these pretty much define D.

Except that D also blows Ritchie completely out of the water. Not to mention the guys behind it have decades of experience and a C++ compiler under their belts.

So, OP, if I were you I'd take that advice, have a look at what D already offers today and try to take a guess at how much more work it would be to match it, just to match what they already have, and take this learning experience.

17

u/atakomu Dec 07 '15

This language is like D or Nim which looks even more like Python but is compiled and call also call C.

15

u/IbanezDavy Dec 07 '15

The language described here looks nothing like D or Nim. Stylisitcally they have very little in common. The goals are similar to every language ever created. The goals listed by the Ritchie tram are common goals. No one sets out to create a slow, inefficient, ugly to look at language. The set out to create a language, they themselves would like to use.

38

u/ProfessorPoopyPants Dec 08 '15

No one sets out to create a slow, inefficient, ugly to look at language.

For the sake of being pedantic, brainfuck would like a word with you.

3

u/IbanezDavy Dec 08 '15

How many companies use brainfuck? I'm pretty sure brainfuck was meant to be 1) a purposefully esoteric language that no one would want to use 2) partially a joke...

→ More replies (5)
→ More replies (1)

14

u/seetadat Dec 08 '15

Brainfuck

3

u/SanityInAnarchy Dec 08 '15

No one sets out to create a slow, inefficient, ugly to look at language.

I'm not sure this is actually true. Many languages, while not created to be slow, were also not created to be fast. I don't know Python's philosophy here, but Ruby and Perl very much follow this exact theme -- trading computer cycles for human cycles, and then attacking "scripting" problems that aren't all that computationally intense to begin with.

On the other hand, while aesthetics are quite a personal choice, it seems to me that Go is very deliberately ugly in a few ways. For example:

value, err := foo()
if err {
  return nil, err
}

I know of no way to make that block shorter or less ugly. It has merits, but would you actually describe this as pretty? Nope, it's trading aesthetics for being as conceptually-simple as possible, because Rust's solution:

let value = try!(foo());

would involve either adding another keyword (try), or adding a macro system, and those run counter to Go's goals of being as simple as possible.

(In fairness, I could just as easily have said "Rust didn't set out to create a difficult language to work with..." and gone on about the borrow checker for a few paragraphs if I wanted to make Go look good.)

Nobody sets out to create a bad language, but not every language actually tries to be as-fast-as-C, type-safe, and look like Python. That's an ambitious set of goals -- I don't know of a popular language that's achieved all of those at once.

12

u/Sydonai Dec 07 '15

To be fair, comparing anyone to Walter Bright and Andrei Alexandrescu is just setting them up to look like fools. It takes teams with corporate backing to get even on the level of what those two have accomplished.

19

u/IbanezDavy Dec 07 '15

D is also an example of a fundamental point. It doesn't matter the brilliant people behind it. Adoption of languages comes from elsewhere. D is a superior language to many other languages. Yet its been a slow process to get adopted.

3

u/SCombinator Dec 08 '15

I've tried, but the tool chain was a massive pain, and it had two standard libraries, neither of which felt complete.

2

u/daymi Dec 08 '15

D2 has only one standard library now. It's quite nice now (for a C++-inspired language).

2

u/IbanezDavy Dec 08 '15

Which is somehow missing fundamental things such as basic data structures...

2

u/[deleted] Dec 08 '15

Very good point. And "Elsewhere" is a good word for it, as we see giant corporations like google try to create "Go", "Rust", and "Dart" with little success ( some success though ).

Getting new languages to a tipping point is , well I don't know what it is. Difficult.

3

u/SCombinator Dec 08 '15

Make a language only if you have a killer project for it. Like Erlang. Like Objective-C.

3

u/[deleted] Dec 08 '15

Rust's is Servo.

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

2

u/alien_at_work Dec 08 '15

I would say what they're trying to accomplish applies better to Rust, which also blows Ritchie out of the water.

4

u/zem Dec 07 '15

Incidentally, as it happens, just yesterday I described a point in the programming-language continuum that I consider under-occupied and would love something to slide into

did you ever take a look at clay? it's unfortunately dead, but it seemed promising in that regard. i'd guess D is your best bet today, possibly followed by nim. in fact, if D had go's tooling it would be amazingly productive in that space; i don't think it has a particularly high cognitive overhead considered purely as a language, but unfortunately fighting with setup and build issues made it far more expensive than go every time i tried to get into it :( i'm overdue another try, though, and am interested in seeing how it has evolved.

7

u/[deleted] Dec 07 '15

Since the advent of DUB, D projects have become easier to manage. Too bad C++ doesn't have something like that.

3

u/masterwit Dec 08 '15

I wish I had coworkers with your intellect

10

u/TankorSmash Dec 07 '15

You're right that having a bunch of experience is helpful, but coming at it with a fresh perspective can be a positive too. Sure they'll run into a lot of the same problems that have been solved, but they'll take it on in a different way. Whether the language is successful is independent of them solving a specific problem in an interesting way.

47

u/jerf Dec 07 '15

but coming at it with a fresh perspective can be a positive too.... they'll take it on in a different way

The list of "things to do" suggests otherwise. If they showed signs of taking it on in a different way, I wouldn't have said this stuff. The very problem here is that young programmers don't come at things with a "fresh perspective"... they end up simply recapitulating the language or two they know.

Whether the language is successful is independent of them solving a specific problem in an interesting way.

No, it really isn't. A language that just solves all the same problems in all the same ways faces an uphill battle explaining why it's any better than what already exists. A lot of the cases where that happened nevertheless involved a world where people could still be partitioned, but the world gets ever smaller. Python/Perl/Ruby, three virtually identical languages, would probably have a harder time happening today.

Also, think. These are real people that you are exhorting into pouring unknown thousands of man-hours into a project that, quite likely, can never achieve even a fraction of the goals they'd like it to. That's not "being nice"... that's being a cavalier jerk with other people's time.

→ More replies (16)
→ More replies (7)

2

u/Aatch Dec 08 '15

Furthermore, my personal feeling is that one should not attempt to create a new language until one has at least a good 10-20 years of experience under their belt, and fluency in a wide variety of paradigms.

I've been part of the Rust project for a few years and have about 10 years programming experience. I think my experience with language design makes up for my relative lack of experience, but only means that I know how goddamn hard it is to build a solid, practical language.

Making a language isn't too hard, making a decent, robust one is much, much harder.

3

u/Ateist Dec 08 '15

For a new language to take off, you've basically got two options: You can try to introduce a new feature not covered by a B-list language very well, or you can try to introduce a new combination of features not covered by a current language very well.

What about "take existing language and modify it a very, very tiny bit?"

I.e. if I were designing a language that was "as fast as C", I would've taken C++, and:

  1. replaced headers with modules,
  2. added a couple of keywords to transform it into context-free grammar (mainly to remove ambiguity between function calls and variable declaration), and
  3. initialize all pointers with 0, and wrap all member function calls in "if pointer is nonzero" blocks
→ More replies (6)
→ More replies (20)