4 ms·
Reading your post was an experience in humility that usually only happens on reddit. Nevertheless, let me try to respond in a constructive manner. First off: I
by nddrylliog 17y ago
Reading your post was an experience in humility that usually only happens on reddit. Nevertheless, let me try to respond in a constructive manner.
First off: I understand your cuteness overload at reading the frontpage. As a matter of fact, you're not the first http://github.com/nddrylliog/rock/issues#issue/1 http://github.com/nddrylliog/rock/issues#issue/1
Also, I wasn't aware XL and Io were internet memes now. They'll be happy to learn about it though =) Moving on to the interesting stuff
1) Generics (not templates, ie. not a subset of macros) support primitive types. This is one of ooc's points of interests (compared to, say, Java). How else would 'for(i in [1, 2, 3])' work, knowing that [1, 2, 3] is an ArrayList<Int> and that Int is a cover from 'int' ?
No it's not lazy, list comprehensions are planned: http://github.com/nddrylliog/bootcamp/blob/master/source/upcoming/list-comprehensions.ooc http://github.com/nddrylliog/bootcamp/blob/master/source/upc... We're still throwing ideas around, AFAIK there's no definitive best solution.
for(x in [1, 2, 3]) x = 2 compiles and runs very well, but doesn't modify the list. Which makes sense, given that it's equivalent to:
{
list := [1, 2, 3]
x : Int
iter := list iterator()
while(iter hasNext()) {
x = iter next()
x = 2
}
}
Iterating over [[],[],[]] will make 'x' a list too, not iterate over the sub-lists recursively. That would be a nightmare imho. You can have a CompoundList or something with a custom iterator if you want.
2) Objects are allocated on the heap, covers/primitives/structs on the stack. This is just a start. Escape analysis will allow the compiler to allocate objects on the stack where it's possible. It is my belief that in a modern language, it shouldn't be up to the programmer to decide if he doesn't want to (but still be possible)
3) No, ooc doesn't have just 'integer', it has covers of all numeric C types. http://docs.ooc-lang.org/sdk/lang/types.html#module-lang/types http://docs.ooc-lang.org/sdk/lang/types.html#module-lang/typ... This is not a definitive state of things, but it worked well enough so far. Also, no, there's a 1-1 mapping between ooc covers and structs, but object clearly have reference semantics on ooc.
No bignums in the core language at the moment (for your 2^30 question), but we're looking for a good (and fast) BSD lib for that. Any suggestions?
4) Hint: we wouldn't announce we got interfaces if we had multiple inheritance. http://news.ycombinator.com/item?id=1288250 http://news.ycombinator.com/item?id=1288250 Mixins are on the way. Single dispatch. All methods are virtual by default (what horrible C++ term), you can make them non-virtual with the 'final' keyword.
5) No, it says "stop listening to your mom about your father's GC and go do some actual performance research to see what fits best for you". Also, -gc=off exists for a purpose. And from the very same paragraph which you 'quoted', we have a link to http://www.hpl.hp.com/personal/Hans_Boehm/gc/ http://www.hpl.hp.com/personal/Hans_Boehm/gc/ Which says quite clearly 'The Boehm-Demers-Weiser conservative garbage collector can be used as a garbage collecting replacement for C malloc'. This is not necessarily a final state of things. It just makes it very easy to use C libs in a garbage-collected manner (think GTK+, etc.), and it performs a lot less worse than one would expect of a conservative GC. That's why the page says "and no, it's not necessarily slower"
6) This is one of the areas where we could definitely get more type safety. You can cast a List<File> to a List<Object> alright, and you can also do the reverse. The compiler is precisely too lax in that area, and that is a real issue to work on for the next releases.
While you make some interesting points and ask some uneasy questions (not hard, just uneasy), I'm surprised that you didn't just try it out and look at the generated C code (-noclean compiler option), which would've answered most of your questions in an eye-blink.
Also, yeah, we do care that our syntax doesn't suck. Most people agree with that. There are interesting semantics all over the place (recent C#, ahem Java7 ahem, all the JVM-ish languages, all the FP languages), the world doesn't need one more Lisp, seriously. I hear Clojure covers pretty well the "FP language that doesn't suck at getting shit done" thing. Kudos to them.
Also, is it possible that you are taking yourself too seriously? When did programming last sounded fun for you? What is your last free time project you enjoyed working on? Those are mostly rethorical questions, but I'd still love to know.
- gizmo 17y agoThanks for the in-depth response. Let me first state that it was not my intention to attack your language. I didn't download or try the language to answer my questions (or read the rest of documentation) because I was just giving my opinion on the introductory guide, not on the language itself! In other words: I'm not saying your language sucks. I haven't formed an opinion on it yet. Regarding bignums, for my programming languages I've settled on imath ( http://spinning-yarns.org/michael/sw/imath/ http://spinning-yarns.org/michael/sw/imath/ ). It has a BSD compatible license, it's ANSI C, it's very fast and it has both bignum and bigdecimal support. It's also memory efficient for small numbers. I'm happy to report that I'm working on hobby projects and my own startup all the time. Having a blast. Next time, please don't assume I'm a sarcastic jerk.
- nddrylliog 17y agoOf course, it's just the pile of adjectives that eventually started to sound a little aggressive, but no offense taken. Also, I understand very well what you want to know as a language designer yourself, the difficulty resides in making the homepage friendly for beginners too! Let me know when we can do expertise-detection of the audience in the browser =) Thanks for the feedback anyway, we're always looking for ways to improve the docs, it's just that one has only 24h a day, as I'm sure you're well aware (especially with a startup on your hands.) IMath sounds awesome, someone suggested it earlier I think but we were worried about performance. I'll definitely give it a shot. I'd love to hear more about your programming language and the design choices you made, where can I get more information? EDIT: I'm sorry that you felt like I considered you a sarcastic jerk. It really wasn't my intention :/ it's just hard to tell the good people apart, you know? Again, apologies if I sounded harsh.