4 ms·
> Rust doesn't target backend app? This isn't the case. We have web backend libraries (servers, database thingies, template engines, I/O, etc) and it's totally
by Manishearth 11y ago
> Rust doesn't target backend app?
This isn't the case. We have web backend libraries (servers, database thingies, template engines, I/O, etc) and it's totally possible to work on backend stuff in Rust. Rust doesn't "not target" much, really. Most of what you do in Python/Go/Ruby is also something we want Rust to work for. There is a false dichotomy of "fast language or safe language" which Rust does away with -- it's not only for situations where you would usually use C++.
- pjmlp 11y agoUntil the rise of scripting languages we would use compiled languages for everything. It feels odd that someone would question it nowadays. I surely do hope Rust gets used for everything.
- ktRolster 11y agoExcept there were always those LISP guys in the back talking about how great the REPL was
- pjmlp 11y agoSo what? Almost every programming language can have a REPL, it is called an interpreter. Anyone with a CS background should know this. Also Lisp is a compiled language since the early days.
- coldtea 11y ago>Almost every programming language can have a REPL, it is called an interpreter. Anyone with a CS background should know this. That's the theory though. The practice is (was) that Lisp had an excellent REPL, and most languages didn't have one at all, or had a crappy one. Some languages lend themselves to a REPL by making it much easier to program one. iPython is great, JS ones are decent. Go attempts at REPLs otoh are mostly BS. C++ REPLs (Cling) etc, are neither very handy nor very popular. Etc. The truth is, some languages handle the REPL situation much better than others. And "scripting" languages are usually better than others at that. And REPL is not really just an interpreter. You can have an interpreter without having a REPL, or without having the kind of full featured REPL we're talking about. Most BASICs run with an interpreter, but didn't have a REPL, for example.
- pjmlp 11y agoThat is why I mentioned almost. I am pretty conformable with Lisp, which isn't a scripting language at all, offers both a very good REPL experience and has the option of compiling to native code, both at REPL and AOT. Also BASICs not only had an interpreter, but they also had AOT compilers. Visual Basic had a REPL, it was called Interactive Window. Scripting languages don't have AOT compilers to native code nor Lisp is a scripting language, so I don't get the point of the comment I was replying to.
- coldtea 11y ago>That is why I mentioned almost. Well, if by "almost" you meant "in practice few and far between", then we agree :-) What I've seen is that languages with AOT rarely have good (or any) REPLs. Now, LISP of course has AOT, but it also shared (and early on) many characteristics of scripting languages (GC, dynamic typing, etc). So, maybe a better way to put it is Algol derived languages with AOT as a rule don't have a good REPL story.
- pjmlp 11y agoThat I agree.
- alfiedotwtf 11y ago> Until the rise of scripting languages we would use compiled languages for everything. That was because at the time, forking was expensive, threading was too hard, and memory leaked like a sieve. Rust addresses all of these problems, and does it nicely.
- pjmlp 11y agoIf you are speaking about C and C++ I agree. For other compiled languages, I don't think so.