79 points · by adamnemecek · 7y ago · 47 comments
I support your quest but actually implementing the language is the hard part. Languages like Rust don’t even mention features on their websites even when they have working implementations that just aren’t stable yet, it would be nice if Cone’s gave a clear picture of what exists and what’s an aspiration.
[1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus#registered-...
[2] https://github.com/duneroadrunner/SaferCPlusPlus#norad-point...
[3] https://github.com/duneroadrunner/SaferCPlusPlus#tasyncshare...
Didn't you say it was mainly for the 3d web or something?
You saw this with the variations of BASIC on the micro computers, the different Pascal and C compilers of the 70s and 80s etc.
But even back then, languages without a compiler were still nothing more than an academic exercise which entertained a comparatively few of the overall engineers around at that time.
So I don’t think much has changed in that regard aside the expectation that a language should now have a reference implementation. And even then that’s not always the case (eg Perl 6).
Perhaps as the language seems to be influenced by Rust it would be good to outline what specific differences it has to Rust in terms of goals.
Not really. If anything concise core can be much easier to read. The key is to discard BS boilerplate and ceremonial code, and have the intention of the code clearer in less lines.
Python is far more readable than Java, for example, and far more concise.
>as well as "flexible typing" and type safe
Not if you support variant types and the like.
> Not if you support variant types and the like.
Not sure what you mean here - discriminant unions? classes?
No, I don't assume that. But I think that that's irrelevant. People didn't know "def" means function in Python or Scala either, but they learn it on the first day and don't have a readability problem with it.
Very basic keywords like "fn" are not the things that make a language unreadable, nor is calling the keyword "fn" instead of "function". Those are memorized in a day or so and you're done with it.
It's other things that make languages unreadable (too many sigils, overloaded operators or keywords in different contexts (C++, Perl), single letter operators (e.g. APL), too low level, too much verbosity, etc.
In any case, whether a person that first encounter a language immediately recognizes what a keyword means is not what makes the language readable. It's how readable it is to its programmers, after they know the language and have written code in it that matters. Familiar != readable.
>Everybody and their grandma can read Pascal and Ada, but abbreviated keywords and magical symbol require foreknowledge.
And almost everybody and their grandma dislike their syntax (especially Ada's), and would prefer something less verbose.
>And the more abbreviated, the more you will have to continuously look up things in the reference manual until they get cemented.
It's after such basics "get cemented" that readability comes into play, not before. If someone has to look after 2-3 days with the language what "fn" means or how to declare a function (and similarly, "def" in Python/Scala, etc), they have some serious memory issues.
(Btw, Rust, Clojure, and others also use "fn").
>Not sure what you mean here - discriminant unions? classes?
Yes, aka variant, aka tagged union, aka sum type...
But something like "fn" isn't going to be a problem, because you're going to use it a dozen times before you finish the tutorial. Symbols are also OK in proportion to their commonality. Rarely used symbols become more problematic. This can be mitigated if there's a clean way to find documentation for them, though you can't get around the problem that google is unlikely to ever be useful for them.
It is fundamentally statically-typed. However, a language that is too rigidly typed can sometimes degrade programmer productivity. Abstractions like variant types and various forms of type polymorphism can improve code flexibility and reuse, which is why I plan for Cone to include these features (the home page has a link to a page that describes this in more detail).
High-level attributes of a language are always hard to get right, because terms mean different things to different people, but several responders do a better job than I did of explaining why concise and readable don't necessarily have to be contradictory goals, at least for me. My primary aim here is that code be maintainable. By concise, I am actually far more focused on how much of a function's logic can fit readably on the editor window without scrolling than I am the size of keywords. Certain common C++/Rust patterns feel unnecessarily verbose to me (e.g., borrowing a reference in Rust), and I am trying to incorporate syntactic patterns from a number of other languages that I feel encode the same intent consistently in a way that a programmer familiar with Cone will be able to process and edit more quickly. Of course, that's always a judgement call...
Keep it up, I will be following the progress.
> ...focused on how much of a function's logic can fit readably on the editor window without scrolling than I am the size of keywords
This seems like a silly reason, we have large widescreen high res monitors - C's curly braces were invented to fit inside 70 char by 90 char terminals. Lets just be honest with ourselves and say its because its what people generally like and/or are used to these days : )
I mean Pascal/Ada isn't all that bad - it just not trendy https://github.com/AdaDoom3/AdaDoom3/blob/master/Engine/neo-...