Your page right now focuses much more strongly on answering what it isn't. It isn't klunky, like C++. It is neither typed nor untyped. It doesn't "limit user's expressivity". It doesn't require you to declare variables, except that's also optional.
It almost comes across like it's nervous that some people might disagree with some design decisions. Let me put your mind at ease: If you are serious, and if you attain any success, I solemnly promise you the Internet will string up your language, dismember it publicly, douse all the pieces in gasoline, light them on fire, and dance around the flames. Why is that actually something that ought to put your mind at ease? Well, it's inevitable anyhow, so you might as well go ahead, have some fun, and make some decisions about what Orange is going to positively be. If you get to that point, remember you'll be the one in possession of a language that's gotten enough attention for that to be worthwhile, and they'll just be hecklers.
While I do strongly believe that optional typing is a feature I want to keep, I have been focusing too hard on taking a middle-of-the-road approach.
The original idea was to have a systems development language that had the same "feel" as a high level scripting language. I didn't do a lot of planning on what that meant from the technical side.
I appreciate the advice. I'll spend some time getting the answer to what Orange actually is.
If it wants to avoid the clunkiness of C++, Orange should have concrete answers for how it will solve the problems that those clunky features address: various sorts of inheritance, compile-time computation and value-indexing with templates and constexpr, operator overloading, data layout, etc.
There's always a troll there to tell you how much better the thing they could have done but didn't is than the thing that you could do and did. It's not true. "I did" beats "I could have" every time.
(Something I was wondering about is that it says "Contains orange standard library stuff" in https://github.com/orange-lang/orange/blob/master/lib/libor/... and "At the moment, Orange has no standard library" in https://github.com/orange-lang/orange/blob/master/README.md at the same time.)
Edit: I definitely was too fast. https://github.com/orange-lang/orange/tree/master/lib/libor doesn't contain any code.
And yeah, as for https://github.com/orange-lang/orange/tree/master/lib/libor, it only contains bootstrap code for the linker at the moment.
Edit: Looks like it does extern calls to `malloc`, with no matching frees. Supporting proper dynamic resource management is fundamental for a system language, as the whole point of an operating system is to manage resources for user programs.
At the moment, I only have a vague idea of what I want Orange to be. The development has mostly been driven with what I thought at the time. It's been a bad approach, and I plan to fix it before I continue developing.
I'm going to work on figuring out Orange's specific goals and points where it differs from new languages like these. Saying I'll have this ready by the end of the weekend might be a stretch, but I will get back to you soon.
tools/orange/main.cc:12:10: fatal error:
'cereal/types/unordered_map.hpp' file not found
#include <cereal/types/unordered_map.hpp>
This one: https://github.com/USCiLab/cereal ?
Please add it as submodule to etc.The apple standard cc=clang-602.0.53 is not good enough. error: no matching constructor for initialization of 'llvm::EngineBuilder' EngineBuilder builder((std::unique_ptr<Module>(m_module)))
macports clang-mp-3.{3,5,6,7} even fail before with this error: no matching constructor for initialization of 'llvm::raw_fd_ostream' raw_fd_ostream raw(loutput.c_str(), ec, llvm::sys::fs::OpenFlags::F_RW)
I only have 5 clang's on my mac.
for (i = 0; i < 10; i++)
Why do so many language copy C's error prone while masquerading as a for loop? This construct is responsible for quite a bit of errors (off by 1).The C for loop was designed by looking at an ALGOL-style for loop:
FOR i FROM 1 BY 2 TO 3 WHILE i≠4 DO ~ OD
and trying to make the construct not tied to integer sequences (because such a specific construct would be out of place in C). The typical for loop, like the one in your comment, has a begin, end and increment parameter, just like the ALGOL example.I assume you mean that you'd prefer some kind of for-each kind of loop, but in order to support that, a language needs a formalized concept of iterators, which may be out of scope for the project.
Not to be a downer, but that's what it seems like since Rust 1.0.
being easy to learn is not enough.
I think "scripters" like me definitely want a language that compiles to a binary (no VM) like C(so easy to deploy on a server or to distribute to third parties), with good a concurrency model(because concurrency is one of the most important thing in web apps today) but expressive yet statically typed. The language that can pull this off will be the next big thing, no question.
Go isn't(the next big thing). it could have been great, but its type system is just horrible once one digs a little bit. No co-variance or contra-variance so extremely limited polymorphism, devs having to do compiler's job with type assertions everywhere, a clunky error system(that could have at least benefited from some syntactic sugar to make it less verbose...). However Go concurrency model is excellent and set a standard
- keeps 90% of C, - adds a string type - adds Go like "classes" (e.g. making more concrete the classic C idiom of passing a struct to the "object" to manipulate a la Glib) - adds a foreach - adds a builtin, multi-purpose map, vector and set type (e.g. based on Glib) for quick work - adds closures a la Obj-C / Apple's C - adds a small, but handy standard library (all C classic stuff + all Glib style stuff). - compiles to C-ABI compatible static binaries
It looks a lot more clean to read than Nim, so this will be interesting.
I couldn't find any more examples besides the simple "hello world", so it would be nice to see a few more in-depth examples.
I struggled coming up with a lot of examples since I don't have a standard library to work with (yet), but the most diverse group of existing programs would probably be at https://github.com/orange-lang/orange/tree/master/test.
Oops! :-)