Live data from Hacker News

Orange: A simple systems programming language

orange-lang.org

31–40 of 42 posts

Re: Orange: A simple systems programming language

#31
post #29
post #27

Earlier quoted context omitted.

I'd personally would like to see a C ABI compatible language, that - 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 standa…

Sounds like you're interested in C++.

> Sounds like you're interested in C++.

C++ is good as long as you don't have to read and debug other people's C++ code. C++ went to far with features and it didn't even fix all C core's problems. I personally like Cyclone syntax and features.

Re: Orange: A simple systems programming language

#32
post #22
post #19

Have you seen Nim and/or Crystal? Both of these languages seem to incorporate a lot of the ideas you are planning for orange, hence I must ask: what makes Orange different?

I've seen both, but I haven't spent a lot of time looking at their documentation to start making comparisons. 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 n…

Crystal looks close to Orange maybe you should contribute to it instead.

Re: Orange: A simple systems programming language

#34
post #32
post #22

Earlier quoted context omitted.

I've seen both, but I haven't spent a lot of time looking at their documentation to start making comparisons. 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 n…

Crystal looks close to Orange maybe you should contribute to it instead.

After looking more into Crystal, it seems to try to be as Ruby-like as possible. I like Ruby, but I think its more involved features are syntactically complicated. I'm also just not a fan of the "everything is an object" mantra.

On the other hand, while Orange takes some syntax as Ruby, I'm trying to keep the syntax small and simple (similarly to C), and make sure that you could write programs for target platforms like the Arduino without needing a runtime.

Re: Orange: A simple systems programming language

#35

for (i = 0; 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).

What do you consider a for loop to be? The loop constructs called "for" that existed prior to C all just iterated through a numeric sequence with an optional step parameter. This was present in BASIC, ALGOL68 and Pascal.

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.

Re: Orange: A simple systems programming language

#36
post #35

for (i = 0; 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).

What do you consider a for loop to be? The loop constructs called "for" that existed prior to C all just iterated through a numeric sequence with an optional step parameter. This was present in BASIC, ALGOL68 and Pascal. 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 con…

The for in my example (which is directly from the linked page) is a while loop written in a compact form. My complaint is that a for loop should name a definite end number without a condition. I think the WHILE portion of the ALGOL-style for loop you give is problematic (and given the example unused). Having a condition as an end condition is error prone.

Re: Orange: A simple systems programming language

#37
post #29
post #27

Earlier quoted context omitted.

I'd personally would like to see a C ABI compatible language, that - 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 standa…

Sounds like you're interested in C++.

With C ABI compatibility (without name mangling and such), and with a much more streamlined feature set...

Re: Orange: A simple systems programming language

#38
post #12

My advice to you is that you need to answer the question, "What is Orange?" 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 deci…

That's great advice for any creative work. People hating on your stuff is much better than people ignoring it.

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.

Re: Orange: A simple systems programming language

#40
post #34
post #32

Earlier quoted context omitted.

Crystal looks close to Orange maybe you should contribute to it instead.

After looking more into Crystal, it seems to try to be as Ruby-like as possible. I like Ruby, but I think its more involved features are syntactically complicated. I'm also just not a fan of the "everything is an object" mantra. On the other hand, while Orange takes some syntax as Ruby, I'm trying to keep the syntax small and simple (similarly to C), and make sure that you could write programs for target platforms li…

I think that Nim fits your description of Orange a lot (apart from the Ruby-like syntax). Please do consider contributing to it.
Post reply on HN