3 ms·
It's just not possible to get it via the means you've described. Why not? it might harder to implement than coffeescript, but ooc is proof that it's possible.
by stephth 15y ago
It's just not possible to get it via the means you've described.
Why not? it might harder to implement than coffeescript, but ooc is proof that it's possible. Remove GC and dependent libs, and you still have a substancially higher level language than C (or C++).
As for ooc and garbage collection: How would you write a compiler for a high level garbage collected language without including a garbage collector?
I didn't say it should be garbage collected: Obviously it would have to come with some lower level semantics, like memory management. The coffeescript approach is it shouldn't have dependencies. By high level, I meant higher level than c++. it will always be lower level than a language like python, without dependencies we can't escape all the semantics underlying in the target language. That said like I mentioned before, memory management could possibly be handled by something similar to Apple's ARC (and to answer your last question, I don't think it's that black and white, look at how Apple is investing on ARC instead of GC; also GC's unpredictability make it a no-go for low level routines in videogames).
- SwellJoe 15y ago"Obviously it would have to come with some lower level semantics, like memory management." Why? Garbage collection is nowhere near the top reason high level languages are slow, and there are GC languages that are fast. "By high level, I meant higher level than c++. it will always be lower level than a language like python" So, Java or C#, then? JIT languages that can be as fast as C/C++ in some circumstances, and faster in others (and slower in still others). And you don't even have to manage your own memory, so it's seemingly higher level than you're asking for. I think GC is fine for high performance computing. Might not be fine for real time systems or games, but that's not what this article is about. It's about high performance scientific computing in Python. Having a GC sweep every now and then, even at unpredictable times, isn't going to cause things to come to a crashing halt or ruin the performance of a batch run. PyPy might be something you'd enjoy reading about. It is an alternative implementation of Python (mostly written in Python, and using a JIT), with the goal of being fast like C. This may be the closest thing to a CoffeeScript like tool where the goal is to make a very high level language faster through translation or "compilation" or whatever.
- stephth 15y ago"Obviously it would have to come with some lower level semantics, like memory management." Why? Once again: this approach means zero dependencies. And in a way, you answered it yourself: Might not be fine for real time systems or games And there are more examples where it might not be fine, here's a major one: building a C++ library. It's true, this article is not about real time systems (I do apologize for diverging...), but this language could be one solution to problems approached in this article (it would replace the C++ example). I am interested in projects like shedskin or pypy, but they have dependencies. The bottom line to me is: a higher level language that compiles to C++ code with zero dependencies. Think about it: this language could be used for any application, deployed in virtually any codebase and any system.