VoltLang / Volta

Compiler for the Volt Programming Language
151 stars 8 forks source link

take ideas from Julia and Nim languages #13

Open bubnenkoff opened 8 years ago

bubnenkoff commented 8 years ago

I am still thinking about ideal programming language. I found Julia look very good. But it's purpose to create language for science. The D also look for me very good, but it's a little bit low level for me. So I hope that Volta could grow to something like Julia language.

perfaram commented 8 years ago

If, like me, you fancy discovering new languages, take a look here : https://github.com/perfaram/awesome-languages. And submit a PR as soon as you find one you find interesting. EDIT: that was shameless self-promotion, and now I'm ashamed.

bhelyer commented 8 years ago

Any features you like in particular, bubnenkoff?

bubnenkoff commented 8 years ago

I think, it's time for easy way to do multi-threading Apps. it's one of reasons why Go grow. So I would like to see in Volta something like Go-routines, that can hide manual work on multi-threading.

Julia have very good macros system, much better then D-ish mixins

Nim have good GC (I am not expert, but I talked with people who said that it's much better than GC in D).

For example in Julia, like Pascal, Lua and some of other languages arrays start with 1. Yes it's not popular solution, but starting with 0, it's big legacy from old-C world.

When we count something, you are start with 1, not from 0.

Now desktop and web are merging and one of main minus of D, that it's have not integrated web-server. It was long discussion about should language include some stuff like frameworks, or it's should be stand-alone. But now people need languages that allow fast creation of sites and it's backends. So I think that Volt can attract more people if it would have some analog of vibed in default distribuition.

Same with GUI. A lot of people like I am want be able to easier write desktop soft, but it's really pain to write even simple graphical hello-world app in D, because you need to spend a lot of time in looking any GUI toolkit that still alive and learn how to use it.

DUB is sucks! I used it's in time when it's had by default json, but now I do not want to learn yeat another dead config format that can't be even googled (I mean "sdl").

Also any serious different from D, can help Volta to attract new people, or they would see at Volta and say that it's just D with some syntax sugar.

I like D, but sometimes it's too low-level, and it's hard to write to them in comparison of other languages.

bubnenkoff commented 8 years ago

http://forum.dlang.org/thread/rnfyngbtqjbiqymsygpr@forum.dlang.org

Dav1dde commented 8 years ago

Why this link? An explanation would be useful...

perfaram commented 8 years ago

Indeed... Is it something you'd like to see included in Volta ?

bubnenkoff commented 8 years ago

I just to Volta be more hight level then D. In the past I very liked Tango lib, that was for me much easier to use then Phobos. I do not like be able to manual memory management, I want simple static-typing language that I can use for every day tasks. Now Julia looks very attractive to me, because it's hide from me a lot of things about which I do not want to think.

Link above was just to save interesting idea, to merge structures and classes

Dav1dde commented 8 years ago

There is an idea of rust similiar traits.

bubnenkoff commented 8 years ago

For compiler to do correction -1 is very easy. Now programmer should this correction in mind. In math when we are calculate something we are count, we count from 1, not from zero, so why in programming language we should start from zero?

Now programming language have a lot of types int, float, double etc. Should we have all of them and force programmer to remember all of them. For example in Smalltalk we have object named Fraction, and it's allow to storage not result of operation but object like 1/3 instead 0.3333... And when we are do any calculation we specifying only how much digits after comma we should to get. GC do all needed memory relocation for as!

Yes, the language may come more slowly then C++ or even D, but I hope to see new Hight Level language for hight level problems. There is enough low level language C, C++, Rust, D, C#, but people need to have more high level language that they.

Wallbraker commented 8 years ago

Since the aim of Volt is to be a system programming language it will not be that much higher then C++ and D.

Volt aims to be more stricter then both C++ and D. At least by default, one of the things that D did wrong was that it isn't @safe by default. There are also some unsafe behavior in C/C++/D that Volt will not inherit, like unsafe integer promotion rules.

In general Volt will be safe and smaller the those language, but still allow a programmer to work around it by marking a function unsafe.

MggMuggins commented 5 years ago

You're doing memory safety primarily via the GC? Would be cool to see this branch from D a little more. I'm a fan of D, but I find it hard to get excited about new languages when Rust is around. Maybe take a look there if you haven't?

I don't mean to be pretentious, so I'm sorry if that came across that way... Also sorry for the necro, just was the best issue for it.

Wallbraker commented 5 years ago

I see what you mean, I haven't really sat down with rust and tried it out so don't know exactly how rust's features play together. My thinking was that Volt should do memory safety in a slightly different way, a GC makes you not have to think at all of life cycles. But there are pros and cons to everything.

Something that isn't in yet but that I have been thinking a lot of is making segmented memory areas in the code. Like a chunk of code gets it's own GC, this is done explicitly by the programmer and in a course grained fashion. Say you parse and format a markdown document, you do this in a separate GC from the main one. Heck you can even make the GC be really stupid, just allocating never collecting, sacrificing memory for speed. You can do this because you know that the operation of parsing a markdown document into html is finite operation. There will be some glue code that gets the string back into the main GC at the end perhaps.

Rust clearly got the mind share and the features to memory safety so might be hard to beat. So I think Volt's selling point should be just it's set of features, memory safety happens to be one, but more then just that.

And no worries about the thread necro, but also feel free to create new ones. :)